#include <sys/syscall.h>
#include <sys/param.h>
-#if __GLIBC__ == 2 && ((defined(I386) && __GLIBC_MINOR__ >= 0) || (defined(M68K) && __GLIBC_MINOR__ >= 1))
-# include <sys/reg.h>
-#else
-# if defined LINUX
-# include <linux/ptrace.h>
-# endif /* LINUX */
+#ifdef HAVE_SYS_REG_H
+#include <sys/reg.h>
+# define PTRACE_PEEKUSR PTRACE_PEEKUSER
#endif
+#if defined(linux) && !defined(__GLIBC__)
+#include <linux/ptrace.h>
+#endif
+
#ifndef SYS_ERRLIST_DECLARED
extern int sys_nerr;
extern char *sys_errlist[];