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 --- libglusterfs/src/events.h.in | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 libglusterfs/src/events.h.in (limited to 'libglusterfs/src/events.h.in') diff --git a/libglusterfs/src/events.h.in b/libglusterfs/src/events.h.in deleted file mode 100644 index 37692bef732..00000000000 --- a/libglusterfs/src/events.h.in +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (c) 2016 Red Hat, Inc. - This file is part of GlusterFS. - - This file is licensed to you under your choice of the GNU Lesser - General Public License, version 3 or any later version (LGPLv3 or - later), or the GNU General Public License, version 2 (GPLv2), in all - cases as published by the Free Software Foundation. -*/ - -#ifndef __EVENTS_H__ -#define __EVENTS_H__ - -#include - -#include "eventtypes.h" - -#define EVENT_PATH "@localstatedir@/run/gluster/events.sock" -#define EVENTS_MSG_MAX 2048 - -extern int gf_event(int key, char *fmt, ...); - -#endif /* __EVENTS_H__ */ -- cgit