]> granicus.if.org Git - procps-ng/commitdiff
testsuite: Make test program compile on Hurd
authorCraig Small <csmall@dropbear.xyz>
Tue, 12 Oct 2021 20:56:39 +0000 (07:56 +1100)
committerCraig Small <csmall@dropbear.xyz>
Tue, 12 Oct 2021 20:59:04 +0000 (07:59 +1100)
procps fails to build from source due to usage of field si_int of struct
siginfo_t in lib/test_process.c which does not exist on GNU/Hurd.

Thanks to Svante Signell for the patch.

References:
 https://bugs.debian.org/987557

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

index f8ff5ed043d064f9f9b44663edaafb1d4861f88c..f323ca71f36b42331308ff9a80997568b8764764 100644 (file)
@@ -62,7 +62,11 @@ signal_handler(int signum, siginfo_t *siginfo, void *ucontext)
            printf("SIG %s\n", signame);
            break;
        case SI_QUEUE:
-           printf("SIG %s value=%d\n", signame, siginfo->si_int);
+#          ifndef __GNU__
+               printf("SIG %s value=%d\n", signame, siginfo->si_int);
+#          else
+               printf("case SI_QUEUE: SIG %s siginfo->si_int undefined\n", signame);
+#endif
            break;
        default:
            printf("Unknown si_code %d\n", siginfo->si_code);