summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authorJohn Spencer <maillist-strace@barfooze.de>2012-12-03 00:27:22 +0100
committerDmitry V. Levin <ldv@altlinux.org>2012-12-06 02:20:33 +0000
commiteb54c4772581a143e2757a2be9718377058cc703 (patch)
tree9b75469c152d2fc1b367f1b70173c5b4e167346b /signal.c
parent05eb905c4433c60d538e134619a3117522072a2f (diff)
downloadstrace-eb54c4772581a143e2757a2be9718377058cc703.tar.gz
strace-eb54c4772581a143e2757a2be9718377058cc703.tar.bz2
strace-eb54c4772581a143e2757a2be9718377058cc703.tar.xz
Fix glibc version checks
* util.c: Check if __GLIBC__ is defined before using it. * signal.c: Likewise. Fix __GLIBC_MINOR__ checks.
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/signal.c b/signal.c
index efe335c..c77758f 100644
--- a/signal.c
+++ b/signal.c
@@ -419,7 +419,7 @@ print_sigset(struct tcb *tcp, long addr, int rt)
# define SI_FROMUSER(sip) ((sip)->si_code <= 0)
#endif
-#if __GLIBC_MINOR__ < 1
+#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1))
/* Type for data associated with a signal. */
typedef union sigval
{
@@ -1111,7 +1111,7 @@ sys_sigsuspend(struct tcb *tcp)
#if !defined SS_ONSTACK
#define SS_ONSTACK 1
#define SS_DISABLE 2
-#if __GLIBC_MINOR__ == 0
+#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1))
typedef struct
{
__ptr_t ss_sp;