summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2011-03-15 17:19:09 +0000
committerDmitry V. Levin <ldv@altlinux.org>2011-03-15 17:19:09 +0000
commit03aefdadb20f3bdd05bf644dc2ce1e85758a5aee (patch)
treecdcb7b379d5c6a173f13f4e36f36d0eda070a014
parent4e4fcafe9edc87b2f99193287267783ddc856883 (diff)
downloadstrace-4.6.tar.gz
strace-4.6.tar.bz2
strace-4.6.tar.xz
Ensure that PTRACE_GETSIGINFO et al are always defined on Linuxv4.6
* configure.ac (AC_CHECK_DECLS): Add PTRACE_* constants. * defs.h [LINUX]: Define those PTRACE_* constants that are not provided by <sys/ptrace.h>.
-rw-r--r--configure.ac10
-rw-r--r--defs.h19
2 files changed, 21 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index c14c011..402f088 100644
--- a/configure.ac
+++ b/configure.ac
@@ -306,6 +306,16 @@ AC_CHECK_MEMBERS([struct sigcontext.sc_hi2],,, [#include <signal.h>
AC_CHECK_DECLS([sys_errlist])
AC_CHECK_DECLS([sys_siglist, _sys_siglist],,, [#include <signal.h>])
+AC_CHECK_DECLS([\
+ PTRACE_SETOPTIONS, \
+ PTRACE_GETEVENTMSG, \
+ PTRACE_GETSIGINFO, \
+ PTRACE_O_TRACEFORK, \
+ PTRACE_O_TRACEVFORK, \
+ PTRACE_O_TRACECLONE, \
+ PTRACE_EVENT_FORK, \
+ PTRACE_EVENT_VFORK, \
+ PTRACE_EVENT_CLONE],,, [#include <sys/ptrace.h>])
AC_PATH_PROG([PERL], [perl])
diff --git a/defs.h b/defs.h
index 7271280..8be668a 100644
--- a/defs.h
+++ b/defs.h
@@ -309,29 +309,32 @@ extern int mp_ioctl (int f, int c, void *a, int s);
#endif
#ifdef LINUX
-# ifndef PTRACE_SETOPTIONS
+# if !HAVE_DECL_PTRACE_SETOPTIONS
# define PTRACE_SETOPTIONS 0x4200
# endif
-# ifndef PTRACE_GETEVENTMSG
+# if !HAVE_DECL_PTRACE_GETEVENTMSG
# define PTRACE_GETEVENTMSG 0x4201
# endif
-# ifndef PTRACE_O_TRACEFORK
+# if !HAVE_DECL_PTRACE_GETSIGINFO
+# define PTRACE_GETSIGINFO 0x4202
+# endif
+# if !HAVE_DECL_PTRACE_O_TRACEFORK
# define PTRACE_O_TRACEFORK 0x00000002
# endif
-# ifndef PTRACE_O_TRACEVFORK
+# if !HAVE_DECL_PTRACE_O_TRACEVFORK
# define PTRACE_O_TRACEVFORK 0x00000004
# endif
-# ifndef PTRACE_O_TRACECLONE
+# if !HAVE_DECL_PTRACE_O_TRACECLONE
# define PTRACE_O_TRACECLONE 0x00000008
# endif
-# ifndef PTRACE_EVENT_FORK
+# if !HAVE_DECL_PTRACE_EVENT_FORK
# define PTRACE_EVENT_FORK 1
# endif
-# ifndef PTRACE_EVENT_VFORK
+# if !HAVE_DECL_PTRACE_EVENT_VFORK
# define PTRACE_EVENT_VFORK 2
# endif
-# ifndef PTRACE_EVENT_CLONE
+# if !HAVE_DECL_PTRACE_EVENT_CLONE
# define PTRACE_EVENT_CLONE 3
# endif
#endif /* LINUX */