summaryrefslogtreecommitdiff
path: root/package/strace/patches/patch-defs_h
blob: 910715f7ac72a273f9bb833d613dcf6873195d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- strace-4.8.orig/defs.h	2013-05-14 16:10:42.000000000 +0200
+++ strace-4.8/defs.h	2014-02-26 17:36:34.000000000 +0100
@@ -155,18 +155,18 @@ extern char *stpcpy(char *dst, const cha
     || defined(METAG) \
     || defined(TILE) \
     || defined(XTENSA) \
-    ) && defined(__GLIBC__)
+    ) && defined(__linux__)
 # include <sys/ptrace.h>
 #else
 /* Work around awkward prototype in ptrace.h. */
 # define ptrace xptrace
 # include <sys/ptrace.h>
 # undef ptrace
-# ifdef POWERPC
+#if defined(POWERPC) && defined(__GLIBC__)
 #  define __KERNEL__
 #  include <asm/ptrace.h>
 #  undef __KERNEL__
-# endif
+#endif
 extern long ptrace(int, int, char *, long);
 #endif
 
@@ -222,7 +222,7 @@ extern long ptrace(int, int, char *, lon
 # define PTRACE_EVENT_EXIT	6
 #endif
 
-#if !defined(__GLIBC__)
+#if !defined(__GLIBC__) && !defined(PTRACE_PEEKUSER)
 # define PTRACE_PEEKUSER PTRACE_PEEKUSR
 # define PTRACE_POKEUSER PTRACE_POKEUSR
 #endif