From 24a3204d7088d11a00e4fa2145e6262f824fe0a9 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 18 Jun 2019 09:46:15 +0530 Subject: compat.h: fix a \#pragma poisoning error 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 --- libglusterfs/src/glusterfs/compat.h | 3 +++ 1 file changed, 3 insertions(+) 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 /* system(), mkostemp() */ #include /* popen() */ +#ifdef GF_LINUX_HOST_OS +#include +#endif #pragma GCC poison system mkostemp popen #endif -- cgit