summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authorWichert Akkerman <wichert@deephackmode.org>1999-07-13 15:45:02 +0000
committerWichert Akkerman <wichert@deephackmode.org>1999-07-13 15:45:02 +0000
commit36915a19e4806339b76209b20fdbd1091c126115 (patch)
tree881f9ceabfc43d9d1a8b67928c8111271a9fe05b /signal.c
parentca4469902c45469a2ec108447cf47d1761801215 (diff)
downloadstrace-36915a19e4806339b76209b20fdbd1091c126115.tar.gz
strace-36915a19e4806339b76209b20fdbd1091c126115.tar.bz2
strace-36915a19e4806339b76209b20fdbd1091c126115.tar.xz
Add test for sys/reg.h and use that instead of asm/ptrace.h
This should fix building problems on glibc2.0 systems
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/signal.c b/signal.c
index e8e755b..e295c50 100644
--- a/signal.c
+++ b/signal.c
@@ -34,18 +34,23 @@
#include <signal.h>
#include <sys/user.h>
#include <fcntl.h>
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 && (defined(I386) || defined(M68K))
-# include <sys/reg.h>
-#endif
#ifdef SVR4
#include <sys/ucontext.h>
#endif /* SVR4 */
-#ifdef LINUX
-#ifndef __GLIBC__
+#if defined(linux) && !defined(__GLIBC__)
#include <linux/ptrace.h>
+#endif
+
+#ifdef HAVE_SYS_REG_H
+# include <sys/reg.h>
+# define PTRACE_PEEKUSR PTRACE_PEEKUSER
+# define PTRACE_POKEUSR PTRACE_POKEUSER
#endif
+
+#ifdef LINUX
+
#ifdef HAVE_ASM_SIGCONTEXT_H
#include <asm/sigcontext.h>
#ifdef SPARC