build: rename event.h to gf-event.h

Newer FreeBSD versions (noticed with 10.3-RELEASE) provide a event.h
file that on occasion gets included instead of the libglusterfs file.
When this happens, 'struct event_pool' will not be defined and building
will fail with errors like:

    autoscale-threads.c:18:55: error: incomplete definition of type 'struct event_pool'
            int                      thread_count   = pool->eventthreadcount;
                                                      ~~~~^
    autoscale-threads.c:17:16: note: forward declaration of 'struct event_pool'
            struct event_pool       *pool           = ctx->event_pool;
                   ^

This problem is caused by 'pkg-config --cflags uuid' that adds
/usr/local/include to the GF_CPPFLAGS. The use of libuuid is preferred
so that the contrib/uuid/ directory can be removed.

By renaming event.h to gf-event.h there is no conflict between the
different event.h files anymore and compiling on FreeBSD works without
issues.

Change-Id: Ie69f6b8a4f8f8e9630d39a86693eb74674f0f763
Updates: bz#1607319
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2018-07-26 13:07:04 +00:00
parent 405c6e8a8a
commit 35cfc01fa2
21 changed files with 25 additions and 22 deletions

View File

@ -19,7 +19,7 @@
#include "glusterfs.h"
#include "glfs.h"
#include "dict.h"
#include "event.h"
#include "gf-event.h"
#include "defaults.h"
#include "rpc-clnt.h"

View File

@ -19,7 +19,7 @@
#include "glusterfs.h"
#include "logging.h"
#include "stack.h"
#include "event.h"
#include "gf-event.h"
#include "glfs-mem-types.h"
#include "common-utils.h"
#include "syncop.h"

View File

@ -38,7 +38,7 @@
#include "glusterfs.h"
#include "logging.h"
#include "stack.h"
#include "event.h"
#include "gf-event.h"
#include "glfs-mem-types.h"
#include "common-utils.h"
#include "syncop.h"

View File

@ -17,7 +17,7 @@
#include "cli-cmd.h"
#include "cli-mem-types.h"
#include "event.h"
#include "gf-event.h"
#include <fnmatch.h>

View File

@ -54,7 +54,7 @@
#include "stack.h"
#include "revision.h"
#include "common-utils.h"
#include "event.h"
#include "gf-event.h"
#include "syscall.h"
#include "call-stub.h"
#include <fnmatch.h>

View File

@ -1658,6 +1658,9 @@ AC_SUBST([GF_CPPFLAGS])
AM_CONDITIONAL([GF_LINUX_HOST_OS], test "${GF_HOST_OS}" = "GF_LINUX_HOST_OS")
AM_CONDITIONAL([GF_DARWIN_HOST_OS], test "${GF_HOST_OS}" = "GF_DARWIN_HOST_OS")
AM_CONDITIONAL([GF_BSD_HOST_OS], test "${GF_HOST_OS}" = "GF_BSD_HOST_OS")
if test "${GF_HOST_OS}" = "GF_BSD_HOST_OS"; then
AC_DEFINE(GF_BSD_HOST_OS, 1, [This is a BSD compatible OS.])
fi
AC_SUBST(GLUSTERD_WORKDIR)
AM_CONDITIONAL([GF_INSTALL_GLUSTERD_WORKDIR], test ! -d ${GLUSTERD_WORKDIR} && test -d ${sysconfdir}/glusterd )

View File

@ -15,7 +15,7 @@
#include "glusterfs.h"
#include "dict.h"
#include "event.h"
#include "gf-event.h"
#include "defaults.h"
#include "rpc-clnt.h"

View File

@ -64,7 +64,7 @@
#include "glusterfsd.h"
#include "revision.h"
#include "common-utils.h"
#include "event.h"
#include "gf-event.h"
#include "statedump.h"
#include "latency.h"
#include "glusterfsd-mem-types.h"

View File

@ -49,7 +49,7 @@ protocol-common.h: $(top_srcdir)/rpc/rpc-lib/src/protocol-common.h
libglusterfs_la_HEADERS = common-utils.h defaults.h default-args.h \
dict.h glusterfs.h hashfn.h timespec.h logging.h xlator.h \
stack.h timer.h list.h inode.h call-stub.h compat.h fd.h \
revision.h compat-errno.h event.h mem-pool.h byte-order.h \
revision.h compat-errno.h gf-event.h mem-pool.h byte-order.h \
gf-dirent.h locking.h syscall.h iobuf.h globals.h statedump.h \
checksum.h daemon.h store.h rbthash.h iatt.h latency.h \
mem-types.h syncop.h cluster-syncop.h graph-utils.h trie.h \

View File

@ -17,7 +17,7 @@
#include <string.h>
#include "logging.h"
#include "event.h"
#include "gf-event.h"
#include "mem-pool.h"
#include "common-utils.h"
#include "syscall.h"

View File

@ -17,7 +17,7 @@
#include <string.h>
#include "logging.h"
#include "event.h"
#include "gf-event.h"
#include "mem-pool.h"
#include "common-utils.h"
#include "syscall.h"

View File

@ -17,7 +17,7 @@
#include <string.h>
#include "logging.h"
#include "event.h"
#include "gf-event.h"
#include "mem-pool.h"
#include "common-utils.h"
#include "libglusterfs-messages.h"

View File

@ -8,8 +8,8 @@
cases as published by the Free Software Foundation.
*/
#ifndef _EVENT_H_
#define _EVENT_H_
#ifndef _GF_EVENT_H_
#define _GF_EVENT_H_
#include <pthread.h>
@ -116,4 +116,4 @@ int event_pool_destroy (struct event_pool *event_pool);
int event_dispatch_destroy (struct event_pool *event_pool);
int event_handled (struct event_pool *event_pool, int fd, int idx, int gen);
#endif /* _EVENT_H_ */
#endif /* _GF_EVENT_H_ */

View File

@ -8,7 +8,7 @@
cases as published by the Free Software Foundation.
*/
#include "event.h"
#include "gf-event.h"
#include "rpcsvc.h"
void

View File

@ -11,7 +11,7 @@
#ifndef _RPCSVC_H
#define _RPCSVC_H
#include "event.h"
#include "gf-event.h"
#include "rpc-transport.h"
#include "logging.h"
#include "dict.h"

View File

@ -19,7 +19,7 @@
#include "rpc-clnt.h"
#include "rpc-transport.h"
#include "xlator.h"
#include "event.h"
#include "gf-event.h"
#include <stdio.h>
#include <list.h>
#include <arpa/inet.h>

View File

@ -21,7 +21,7 @@
#include <openssl/ecdh.h>
#endif
#include "event.h"
#include "gf-event.h"
#include "rpc-transport.h"
#include "logging.h"
#include "dict.h"

View File

@ -13,7 +13,7 @@
#include "rpcsvc.h"
#include "rpc-clnt.h"
#include "event.h"
#include "gf-event.h"
#include "call-stub.h"
#include "changelog-xdr.h"

View File

@ -19,7 +19,7 @@
#include "compat.h"
#include "logging.h"
#include "dict.h"
#include "event.h"
#include "gf-event.h"
#include "rpcsvc.h"
#include "rpc-clnt.h"
#include "byte-order.h"

View File

@ -15,7 +15,7 @@
#include "glusterfs.h"
#include "statedump.h"
#include "compat-errno.h"
#include "event.h"
#include "gf-event.h"
#include "xdr-rpc.h"
#include "glusterfs3.h"

View File

@ -20,7 +20,7 @@
#include "statedump.h"
#include "defaults.h"
#include "authenticate.h"
#include "event.h"
#include "gf-event.h"
#include "events.h"
#include "server-messages.h"
#include "rpc-clnt.h"