diff --git a/configure b/configure index d1cd164b98c..58f25791a22 100755 --- a/configure +++ b/configure @@ -5949,6 +5949,7 @@ for ac_header in \ arpa/inet.h \ arpa/nameser.h \ asm/types.h \ + asm/user.h \ curses.h \ direct.h \ dirent.h \ diff --git a/configure.ac b/configure.ac index 0fce454dec1..1055b0a62bb 100644 --- a/configure.ac +++ b/configure.ac @@ -409,6 +409,7 @@ AC_CHECK_HEADERS(\ arpa/inet.h \ arpa/nameser.h \ asm/types.h \ + asm/user.h \ curses.h \ direct.h \ dirent.h \ diff --git a/include/config.h.in b/include/config.h.in index 5863d10bc04..01e484ec845 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -35,6 +35,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASM_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_ASM_USER_H + /* Define to 1 if you have the header file. */ #undef HAVE_AUDIOTOOLBOX_AUDIOCONVERTER_H diff --git a/server/ptrace.c b/server/ptrace.c index ed72b7d74bd..9897a085806 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -528,9 +528,15 @@ void get_selector_entry( struct thread *thread, int entry, unsigned int *base, } -#if defined(linux) && defined(HAVE_SYS_USER_H) && (defined(__i386__) || defined(__x86_64__)) +#if defined(linux) && (defined(HAVE_SYS_USER_H) || defined(HAVE_ASM_USER_H)) \ + && (defined(__i386__) || defined(__x86_64__)) +#ifdef HAVE_SYS_USER_H #include +#endif +#ifdef HAVE_ASM_USER_H +#include +#endif /* debug register offset in struct user */ #define DR_OFFSET(dr) ((((struct user *)0)->u_debugreg) + (dr))