summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */