summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan <dan@d3fy.net>2019-06-18 09:46:15 +0530
committerAmar Tumballi <amarts@redhat.com>2019-06-25 04:59:25 +0000
commit24a3204d7088d11a00e4fa2145e6262f824fe0a9 (patch)
treec70848233f61faea2737e6ddeb2c5f15d8f501d1
parentd1d9c2587f5a985073039db5d15fe9adb0433547 (diff)
compat.h: fix a \#pragma poisoning errorv8dev
Fixes a failure to compile glusterfs with glibc 2.25 (on Gentoo and other systems) Making all in src CC libglusterfs_la-dict.lo In file included from iatt.h:16:0, from common-utils.h:44, from dict.c:20: /usr/include/sys/sysmacros.h:57:45: error: attempt to use poisoned "system" directly. If you did not intend to use a system-defined macro\n\ ^ make[4]: *** [Makefile:959: libglusterfs_la-dict.lo] Error 1 Fixes: bz#1494654 Change-Id: I09b910b5772f52e853f87d81f3923eed9a90f7a1 Signed-off-by: Amar Tumballi <amarts@redhat.com>
-rw-r--r--libglusterfs/src/glusterfs/compat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs/compat.h b/libglusterfs/src/glusterfs/compat.h
index d2686499973..bf00d903152 100644
--- a/libglusterfs/src/glusterfs/compat.h
+++ b/libglusterfs/src/glusterfs/compat.h
@@ -528,6 +528,9 @@ dirname_r(char *path);
/* Use run API, see run.h */
#include <stdlib.h> /* system(), mkostemp() */
#include <stdio.h> /* popen() */
+#ifdef GF_LINUX_HOST_OS
+#include <sys/sysmacros.h>
+#endif
#pragma GCC poison system mkostemp popen
#endif