diff options
author | Niels de Vos <ndevos@redhat.com> | 2018-07-26 13:07:04 +0000 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2018-07-27 17:37:32 +0000 |
commit | 35cfc01fa2e395111f7d629f00dc06eecf35a709 (patch) | |
tree | d950ccda65f97be4aa40654770fdf6f90ea78689 | |
parent | 405c6e8a8a64f29b37c154091e1677ef67440e73 (diff) |
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>
-rw-r--r-- | api/src/glfs-mgmt.c | 2 | ||||
-rw-r--r-- | api/src/glfs-resolve.c | 2 | ||||
-rw-r--r-- | api/src/glfs.c | 2 | ||||
-rw-r--r-- | cli/src/cli-rl.c | 2 | ||||
-rw-r--r-- | cli/src/cli.c | 2 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 2 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 2 | ||||
-rw-r--r-- | libglusterfs/src/Makefile.am | 2 | ||||
-rw-r--r-- | libglusterfs/src/event-epoll.c | 2 | ||||
-rw-r--r-- | libglusterfs/src/event-poll.c | 2 | ||||
-rw-r--r-- | libglusterfs/src/event.c | 2 | ||||
-rw-r--r-- | libglusterfs/src/gf-event.h (renamed from libglusterfs/src/event.h) | 6 | ||||
-rw-r--r-- | rpc/rpc-lib/src/autoscale-threads.c | 2 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.h | 2 | ||||
-rw-r--r-- | rpc/rpc-transport/rdma/src/rdma.h | 2 | ||||
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.h | 2 | ||||
-rw-r--r-- | xlators/features/changelog/src/changelog-rpc-common.h | 2 | ||||
-rw-r--r-- | xlators/features/quota/src/quota.h | 2 | ||||
-rw-r--r-- | xlators/protocol/client/src/client.c | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.c | 2 |
21 files changed, 25 insertions, 22 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c index 26b8538e381..911a7330512 100644 --- a/api/src/glfs-mgmt.c +++ b/api/src/glfs-mgmt.c @@ -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" diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c index 4b764d94122..e7dd7dca102 100644 --- a/api/src/glfs-resolve.c +++ b/api/src/glfs-resolve.c @@ -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" diff --git a/api/src/glfs.c b/api/src/glfs.c index 694e5e6f947..652520c41eb 100644 --- a/api/src/glfs.c +++ b/api/src/glfs.c @@ -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" diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c index 4745cf49369..1bb9bf07c51 100644 --- a/cli/src/cli-rl.c +++ b/cli/src/cli-rl.c @@ -17,7 +17,7 @@ #include "cli-cmd.h" #include "cli-mem-types.h" -#include "event.h" +#include "gf-event.h" #include <fnmatch.h> diff --git a/cli/src/cli.c b/cli/src/cli.c index 1ae56e8f534..025f72c9748 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -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> diff --git a/configure.ac b/configure.ac index 627a7a939a6..3c9602033e0 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ) diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 1e9015440ae..e954c1f3d33 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -15,7 +15,7 @@ #include "glusterfs.h" #include "dict.h" -#include "event.h" +#include "gf-event.h" #include "defaults.h" #include "rpc-clnt.h" diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index c16d2b6b90f..d4b3a1139ad 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -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" diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am index fc7cb8fd016..bfe0900e547 100644 --- a/libglusterfs/src/Makefile.am +++ b/libglusterfs/src/Makefile.am @@ -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 \ diff --git a/libglusterfs/src/event-epoll.c b/libglusterfs/src/event-epoll.c index c1474c8bc69..ed58899caa8 100644 --- a/libglusterfs/src/event-epoll.c +++ b/libglusterfs/src/event-epoll.c @@ -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" diff --git a/libglusterfs/src/event-poll.c b/libglusterfs/src/event-poll.c index da69866fbf7..797649f11b8 100644 --- a/libglusterfs/src/event-poll.c +++ b/libglusterfs/src/event-poll.c @@ -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" diff --git a/libglusterfs/src/event.c b/libglusterfs/src/event.c index 6562d86a991..61006c100fa 100644 --- a/libglusterfs/src/event.c +++ b/libglusterfs/src/event.c @@ -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" diff --git a/libglusterfs/src/event.h b/libglusterfs/src/gf-event.h index c60b14ad04b..55a74ed17c6 100644 --- a/libglusterfs/src/event.h +++ b/libglusterfs/src/gf-event.h @@ -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_ */ diff --git a/rpc/rpc-lib/src/autoscale-threads.c b/rpc/rpc-lib/src/autoscale-threads.c index 33ba58c490b..4840fd4e971 100644 --- a/rpc/rpc-lib/src/autoscale-threads.c +++ b/rpc/rpc-lib/src/autoscale-threads.c @@ -8,7 +8,7 @@ cases as published by the Free Software Foundation. */ -#include "event.h" +#include "gf-event.h" #include "rpcsvc.h" void diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index 7ed0dca2ad0..c6efa4f5369 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -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" diff --git a/rpc/rpc-transport/rdma/src/rdma.h b/rpc/rpc-transport/rdma/src/rdma.h index 7ca0ead1f7a..39f7f45046d 100644 --- a/rpc/rpc-transport/rdma/src/rdma.h +++ b/rpc/rpc-transport/rdma/src/rdma.h @@ -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> diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h index fdfc20774a8..4e65489f987 100644 --- a/rpc/rpc-transport/socket/src/socket.h +++ b/rpc/rpc-transport/socket/src/socket.h @@ -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" diff --git a/xlators/features/changelog/src/changelog-rpc-common.h b/xlators/features/changelog/src/changelog-rpc-common.h index 95c850c9400..1a630536924 100644 --- a/xlators/features/changelog/src/changelog-rpc-common.h +++ b/xlators/features/changelog/src/changelog-rpc-common.h @@ -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" diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h index b99ca820e7f..9fe0e3e0a51 100644 --- a/xlators/features/quota/src/quota.h +++ b/xlators/features/quota/src/quota.h @@ -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" diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index bc1322573e2..cd30ed9637f 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -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" diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index e4a5bdac1f5..8ff51a1c16d 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -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" |