From d1aa35c3619847922e092b7dbfb201bceea8fa33 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Thu, 18 Aug 2016 14:51:44 +0530 Subject: eventsapi: Fix disable-events issue Events related sources are not loaded in libglusterfs when configure is run with --disable-events option. Due to this every call of gf_event should be guarded with USE_EVENTS macro. To prevent this, USE_EVENTS macro was included in events.c itself(Patch #15054) Instead of disabling building entire directory "events", selectively disabled the code. So that constants and empty function gf_event is exposed. Code will not fail even if gf_event is called when events is disabled. BUG: 1368042 Change-Id: Ia6abfe9c1e46a7640c4d8ff5ccf0e9c30c87f928 Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/15198 Smoke: Gluster Build System Reviewed-by: Niels de Vos CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System --- xlators/features/bit-rot/src/bitd/bit-rot-scrub.c | 1 + xlators/mgmt/glusterd/src/glusterd.h | 1 + 2 files changed, 2 insertions(+) (limited to 'xlators') diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c index 65e9ed98d31..1db38e43ee8 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c @@ -20,6 +20,7 @@ #include #include "bit-rot-bitd-messages.h" #include "bit-rot-scrub-status.h" +#include "events.h" struct br_scrubbers { pthread_t scrubthread; diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index 909471401bb..77eded4f29c 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -36,6 +36,7 @@ #include "syncop.h" #include "store.h" #include "glusterd-rcu.h" +#include "events.h" #define GLUSTERD_TR_LOG_SIZE 50 #define GLUSTERD_SOCKET_LISTEN_BACKLOG 128 -- cgit