aboutsummaryrefslogtreecommitdiffstats
path: root/main/strace/strace-musl.patch
blob: 46935b1372a6514ed315034f33184a49f6552ee4 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
Binary files strace-4.8.orig/count.o and strace-4.8/count.o differ
diff -x '*Po' -ru strace-4.8.orig/defs.h strace-4.8/defs.h
--- strace-4.8.orig/defs.h	2013-05-14 14:10:42.000000000 +0000
+++ strace-4.8/defs.h	2013-09-10 16:34:31.319995356 +0000
@@ -155,7 +155,7 @@
     || defined(METAG) \
     || defined(TILE) \
     || defined(XTENSA) \
-    ) && defined(__GLIBC__)
+    ) && defined(__linux__)
 # include <sys/ptrace.h>
 #else
 /* Work around awkward prototype in ptrace.h. */
@@ -222,7 +222,7 @@
 # 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
diff -x '*Po' -ru strace-4.8.orig/desc.c strace-4.8/desc.c
--- strace-4.8.orig/desc.c	2013-05-01 22:39:10.000000000 +0000
+++ strace-4.8/desc.c	2013-09-10 16:26:58.639995444 +0000
@@ -299,7 +299,7 @@
 #ifdef X32
 	tprintf(", start=%lld, len=%lld", fl.l_start, fl.l_len);
 #else
-	tprintf(", start=%ld, len=%ld", fl.l_start, fl.l_len);
+	tprintf(", start=%ld, len=%ld", (long) fl.l_start, (long) fl.l_len);
 #endif
 	if (getlk)
 		tprintf(", pid=%lu}", (unsigned long) fl.l_pid);
Binary files strace-4.8.orig/desc.o and strace-4.8/desc.o differ
diff -x '*Po' -ru strace-4.8.orig/file.c strace-4.8/file.c
--- strace-4.8.orig/file.c	2013-05-06 18:23:01.000000000 +0000
+++ strace-4.8/file.c	2013-09-11 06:12:07.569985853 +0000
@@ -632,7 +632,7 @@
 	return 0;
 }
 
-#if _LFS64_LARGEFILE
+#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
 int
 sys_truncate64(struct tcb *tcp)
 {
@@ -654,7 +654,7 @@
 	return 0;
 }
 
-#if _LFS64_LARGEFILE
+#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
 int
 sys_ftruncate64(struct tcb *tcp)
 {
@@ -2322,7 +2322,7 @@
 	return 0;
 }
 
-#if _LFS64_LARGEFILE
+#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
 int
 sys_getdents64(struct tcb *tcp)
 {
Binary files strace-4.8.orig/file.o and strace-4.8/file.o differ
Binary files strace-4.8.orig/mem.o and strace-4.8/mem.o differ
diff -x '*Po' -ru strace-4.8.orig/net.c strace-4.8/net.c
--- strace-4.8.orig/net.c	2013-05-17 22:20:02.000000000 +0000
+++ strace-4.8/net.c	2013-09-10 16:21:10.969995511 +0000
@@ -95,12 +95,14 @@
 #endif
 
 /* Under Linux these are enums so we can't test for them with ifdef. */
+#if !defined(IPPROTO_MAX)
 #define IPPROTO_EGP IPPROTO_EGP
 #define IPPROTO_PUP IPPROTO_PUP
 #define IPPROTO_IDP IPPROTO_IDP
 #define IPPROTO_IGMP IPPROTO_IGMP
 #define IPPROTO_RAW IPPROTO_RAW
 #define IPPROTO_MAX IPPROTO_MAX
+#endif
 
 static const struct xlat domains[] = {
 #ifdef PF_UNSPEC
Only in strace-4.8: net.o
Only in strace-4.8: pathtrace.o
diff -x '*Po' -ru strace-4.8.orig/process.c strace-4.8/process.c
--- strace-4.8.orig/process.c	2013-05-17 22:22:19.000000000 +0000
+++ strace-4.8/process.c	2013-09-10 16:25:04.069995466 +0000
@@ -2857,7 +2857,7 @@
 		if (umove(tcp, tcp->u_arg[2], &p) < 0)
 			tprintf(", %#lx", tcp->u_arg[2]);
 		else
-			tprintf(", { %d }", p.__sched_priority);
+			tprintf(", { %d }", p.sched_priority);
 	}
 	return 0;
 }
@@ -2872,7 +2872,7 @@
 		if (umove(tcp, tcp->u_arg[1], &p) < 0)
 			tprintf("%#lx", tcp->u_arg[1]);
 		else
-			tprintf("{ %d }", p.__sched_priority);
+			tprintf("{ %d }", p.sched_priority);
 	}
 	return 0;
 }
@@ -2885,7 +2885,7 @@
 		if (umove(tcp, tcp->u_arg[1], &p) < 0)
 			tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
 		else
-			tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority);
+			tprintf("%d, { %d }", (int) tcp->u_arg[0], p.sched_priority);
 	}
 	return 0;
 }
Only in strace-4.8: process.o
Only in strace-4.8: quota.o
Only in strace-4.8: resource.o
Only in strace-4.8: scsi.o
diff -x '*Po' -ru strace-4.8.orig/signal.c strace-4.8/signal.c
--- strace-4.8.orig/signal.c	2013-05-23 13:41:23.000000000 +0000
+++ strace-4.8/signal.c	2013-09-10 16:32:38.429995378 +0000
@@ -59,6 +59,7 @@
 #ifdef IA64
 # include <asm/ptrace_offsets.h>
 #endif
+#include <asm/ptrace.h>
 
 #if defined(SPARC) || defined(SPARC64) || defined(MIPS)
 typedef struct {
Only in strace-4.8: signal.o
Only in strace-4.8: sock.o
Only in strace-4.8: strace
diff -x '*Po' -ru strace-4.8.orig/strace.c strace-4.8/strace.c
--- strace-4.8.orig/strace.c	2013-05-28 21:49:16.000000000 +0000
+++ strace-4.8/strace.c	2013-09-10 16:31:07.969995395 +0000
@@ -506,7 +506,7 @@
 				perror_msg_and_die("dup2");
 			close(fds[0]);
 		}
-		execl(_PATH_BSHELL, "sh", "-c", command, NULL);
+		execl(_PATH_BSHELL, "sh", "-c", command, (void*) 0);
 		perror_msg_and_die("Can't execute '%s'", _PATH_BSHELL);
 	}
 
Only in strace-4.8: strace.o
Only in strace-4.8: stream.o
diff -x '*Po' -ru strace-4.8.orig/syscall.c strace-4.8/syscall.c
--- strace-4.8.orig/syscall.c	2013-05-14 14:10:42.000000000 +0000
+++ strace-4.8/syscall.c	2013-09-10 16:32:21.969995381 +0000
@@ -72,13 +72,7 @@
 # include <elf.h>
 #endif
 
-#if defined(AARCH64)
-# include <asm/ptrace.h>
-#endif
-
-#if defined(XTENSA)
-# include <asm/ptrace.h>
-#endif
+#include <asm/ptrace.h>
 
 #ifndef ERESTARTSYS
 # define ERESTARTSYS	512
Only in strace-4.8: syscall.o
Only in strace-4.8: system.o
Only in strace-4.8: term.o
diff -x '*Po' -ru strace-4.8.orig/time.c strace-4.8/time.c
--- strace-4.8.orig/time.c	2012-05-01 21:17:51.000000000 +0000
+++ strace-4.8/time.c	2013-09-10 16:36:36.469995332 +0000
@@ -774,7 +774,7 @@
 			/* _pad[0] is the _tid field which might not be
 			   present in the userlevel definition of the
 			   struct.  */
-			tprintf("{%d}", sev._sigev_un._pad[0]);
+			tprintf("{%d}", (int) sev.__pad[0]);
 		else if (sev.sigev_notify == SIGEV_THREAD)
 			tprintf("{%p, %p}", sev.sigev_notify_function,
 				sev.sigev_notify_attributes);
Only in strace-4.8: time.o
Only in strace-4.8: util.o
Only in strace-4.8: vsprintf.o