]> granicus.if.org Git - procps-ng/commitdiff
build-sys:
authorCraig Small <csmall@dropbear.xyz>
Mon, 11 Apr 2022 07:09:53 +0000 (17:09 +1000)
committerCraig Small <csmall@dropbear.xyz>
Mon, 11 Apr 2022 07:09:53 +0000 (17:09 +1000)
While the previous commit checked for a GNU environment so Hurd
compilied ok, this tripped up Cygwin. configure now explicitly tests
for the structure field rather than trying to guess through compilier
flags about what the environment tells us about signals.h

References:
 commit d39d9db07974f4f09cd2f31137742a7ea3be65c5

Signed-off-by: Craig Small <csmall@dropbear.xyz>
configure.ac
lib/test_process.c

index 951d77bfddab97e2a7137bcc9ae9ddbfbca9b873..2d83aef15a2af4ea4e155ed800baa2736606e761 100644 (file)
@@ -69,6 +69,7 @@ AC_C_RESTRICT
 AC_TYPE_SIZE_T
 AC_TYPE_SSIZE_T
 AC_CHECK_MEMBERS([struct stat.st_rdev])
+AC_CHECK_MEMBERS([siginfo_t.si_int], [], [], [[#include <signal.h>]])
 
 dnl libtool
 LT_INIT
index f07f1d2c473f25c234ddf841e87dce7c718fb22e..ef2582e876f9c2344d7f47ddd82e5e5416947ab6 100644 (file)
@@ -62,9 +62,9 @@ signal_handler(int signum, siginfo_t *siginfo, void *ucontext)
            printf("SIG %s\n", signame);
            break;
        case SI_QUEUE:
-#          ifndef __GNU__
+#ifdef HAVE_SIGINFO_T_SI_INT
                printf("SIG %s value=%d\n", signame, siginfo->si_int);
-#          else
+#else
                printf("case SI_QUEUE: SIG %s siginfo->si_int undefined\n", signame);
 #endif
            break;