]> granicus.if.org Git - strace/commitdiff
build: fix build if siginfo_t lacks si_timerid/si_overrun
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 13 Jan 2015 06:24:04 +0000 (09:24 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 13 Jan 2015 06:41:44 +0000 (06:41 +0000)
* configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_timerid and
siginfo_t.si_overrun.
* signal.c (printsiginfo) [SI_TIMER]: Check HAVE_SIGINFO_T_SI_TIMERID
and HAVE_SIGINFO_T_SI_OVERRUN.

configure.ac
signal.c

index 66946704bcb6a11f7f77626d0a61c8b034a2b39c..34a621547ef57198d3caf5739af33e422c51fb78 100644 (file)
@@ -268,7 +268,9 @@ AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
 
 AC_CHECK_MEMBERS([struct sigevent._sigev_un._pad,
                  struct sigevent.__pad,
-                 siginfo_t.si_syscall],,, [#include <signal.h>])
+                 siginfo_t.si_syscall,
+                 siginfo_t.si_timerid,
+                 siginfo_t.si_overrun],,, [#include <signal.h>])
 
 AC_CHECK_MEMBERS([struct sysinfo.totalhigh,
                  struct sysinfo.freehigh,
index 6f00fc0e706027cea0f115cb9f7e81ec6d486d81..a019905f74db9003cdc1870a3e933978613628a8 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -453,7 +453,8 @@ printsiginfo(siginfo_t *sip, int verbose)
                                printsigsource(sip);
                                break;
 #endif
-#ifdef SI_TIMER
+#if defined SI_TIMER \
+ && defined HAVE_SIGINFO_T_SI_TIMERID && defined HAVE_SIGINFO_T_SI_OVERRUN
                        case SI_TIMER:
                                tprintf(", si_timerid=%#x, si_overrun=%d",
                                        sip->si_timerid, sip->si_overrun);