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 /libglusterfs | |
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>
Diffstat (limited to 'libglusterfs')
-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 |
5 files changed, 7 insertions, 7 deletions
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_ */ |