summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcrm.c
diff options
context:
space:
mode:
authorGuillem Jover2009-10-08 13:40:11 +0200
committerKarel Zak2009-10-09 15:16:25 +0200
commit869829e457cf7ca79c7f3f997088af8cb70aff77 (patch)
tree3cd165e9c53444ba2a5ee39869ff4582899bec84 /sys-utils/ipcrm.c
parentbuild-sys: enable silent rules if automake >= 1.11 (diff)
downloadkernel-qcow2-util-linux-869829e457cf7ca79c7f3f997088af8cb70aff77.tar.gz
kernel-qcow2-util-linux-869829e457cf7ca79c7f3f997088af8cb70aff77.tar.xz
kernel-qcow2-util-linux-869829e457cf7ca79c7f3f997088af8cb70aff77.zip
build-sys: check for union semun instead of using _SEM_SEMUN_UNDEFINED
Older versions of glibc used to declare ‘union semun’ in <sys/sem.h>, but POSIX.1-2001 requires the caller to declare it instead. Later versions of glibc started defining _SEM_SEMUN_UNDEFINED to note that the union was not being declared, but conforming systems are not required to define that macro (e.g. FreeBSD). As a side effect we get rid of some obsolete __GNU_LIBRARY__ macro usage. [kzak@redhat.com: - use #ifndef] Signed-off-by: Guillem Jover <guillem@hadrons.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/ipcrm.c')
-rw-r--r--sys-utils/ipcrm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c
index 11a5af2c5..f07eac826 100644
--- a/sys-utils/ipcrm.c
+++ b/sys-utils/ipcrm.c
@@ -26,9 +26,7 @@
/* for tolower and isupper */
#include <ctype.h>
-#if defined (__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
-/* union semun is defined by including <sys/sem.h> */
-#else
+#ifndef HAVE_UNION_SEMUN
/* according to X/OPEN we have to define it ourselves */
union semun {
int val;