summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGuillem Jover2009-10-08 13:40:11 +0200
committerKarel Zak2009-10-09 15:16:25 +0200
commit869829e457cf7ca79c7f3f997088af8cb70aff77 (patch)
tree3cd165e9c53444ba2a5ee39869ff4582899bec84 /configure.ac
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 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ed3c3b07c..7b11ab1fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -469,6 +469,11 @@ printf(__progname);
])
+AC_CHECK_TYPES([union semun], [], [], [[
+#include <sys/sem.h>
+]])
+
+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <wchar.h>
#include <wctype.h>