summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--sys-utils/ipcrm.c4
-rw-r--r--sys-utils/ipcs.c4
3 files changed, 7 insertions, 6 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>
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;
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 55d5c80f3..0e645d138 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -77,9 +77,7 @@ struct shm_info {
/* The last arg of semctl is a union semun, but where is it defined?
X/OPEN tells us to define it ourselves, but until recently
Linux include files would also define it. */
-#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;