Blame SOURCES/strace-rh1129572.patch

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