commit 03ef0b2665363adf6100bc4af479a14b5f17bc27 Author: Dmitry V. Levin Date: Wed Nov 13 18:09:04 2013 +0000 Assume that provides a valid ptrace prototype We used to explicitly list architectures where from glibc is known to provide a valid prototype for ptrace, and use a homegrown replacement for all the rest. Situation seems to be better nowadays, glibc is not the only libc available, so let's use ptrace prototype from by default, leaving the replacement for rare broken cases if any. * defs.h: Use ptrace prototype workaround iff NEED_PTRACE_PROTOTYPE_WORKAROUND is defined. --- strace-4.8/defs.h +++ strace-4.8/defs.h @@ -147,27 +147,17 @@ extern char *stpcpy(char *dst, const cha /* To force NOMMU build, set to 1 */ #define NOMMU_SYSTEM 0 -#if (defined(SPARC) || defined(SPARC64) \ - || defined(I386) || defined(X32) || defined(X86_64) \ - || defined(ARM) || defined(AARCH64) \ - || defined(AVR32) \ - || defined(OR1K) \ - || defined(METAG) \ - || defined(TILE) \ - || defined(XTENSA) \ - ) && defined(__GLIBC__) -# include -#else -/* Work around awkward prototype in ptrace.h. */ +#ifdef NEED_PTRACE_PROTOTYPE_WORKAROUND # define ptrace xptrace # include # undef ptrace -# ifdef POWERPC -# define __KERNEL__ -# include -# undef __KERNEL__ -# endif extern long ptrace(int, int, char *, long); +#else +# include +#endif + +#if defined(POWERPC) +# include #endif #if defined(TILE)