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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
From 822dddfbf1884553341114663aff56ed87d57663 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 18 Feb 2017 00:50:09 +0000
Subject: [PATCH 23/30] make syscall.h consistent with linux
most of the found naming differences don't matter to musl, because
internally it unifies the syscall names that vary across targets,
but for external code the names should match the kernel uapi.
aarch64:
__NR_fstatat is called __NR_newfstatat in linux.
__NR_or1k_atomic got mistakenly copied from or1k.
arm:
__NR_arm_sync_file_range is an alias for __NR_sync_file_range2
__NR_fadvise64_64 is called __NR_arm_fadvise64_64 in linux,
the old non-arm name is kept too, it should not cause issues.
(powerpc has similar nonstandard fadvise and it uses the
normal name.)
i386:
__NR_madvise1 was removed from linux in commit
303395ac3bf3e2cb488435537d416bc840438fcb 2011-11-11
microblaze:
__NR_fadvise, __NR_fstatat, __NR_pread, __NR_pwrite
had different name in linux.
mips:
__NR_fadvise, __NR_fstatat, __NR_pread, __NR_pwrite, __NR_select
had different name in linux.
mipsn32:
__NR_fstatat is called __NR_newfstatat in linux.
or1k:
__NR__llseek is called __NR_llseek in linux.
the old name is kept too because that's the name musl uses
internally.
powerpc:
__NR_{get,set}res{gid,uid}32 was never present in powerpc linux.
__NR_timerfd was briefly defined in linux but then got renamed.
---
arch/aarch64/bits/syscall.h.in | 3 +--
arch/arm/bits/syscall.h.in | 2 ++
arch/i386/bits/syscall.h.in | 1 -
arch/microblaze/bits/syscall.h.in | 8 ++++----
arch/mips/bits/syscall.h.in | 10 +++++-----
arch/mips/syscall_arch.h | 6 +++---
arch/mipsn32/bits/syscall.h.in | 2 +-
arch/mipsn32/syscall_arch.h | 6 +++---
arch/or1k/bits/syscall.h.in | 1 +
arch/powerpc/bits/syscall.h.in | 5 -----
10 files changed, 20 insertions(+), 24 deletions(-)
diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in
index fd388eec..8b56afff 100644
--- a/arch/aarch64/bits/syscall.h.in
+++ b/arch/aarch64/bits/syscall.h.in
@@ -77,7 +77,7 @@
#define __NR_splice 76
#define __NR_tee 77
#define __NR_readlinkat 78
-#define __NR_fstatat 79
+#define __NR_newfstatat 79
#define __NR_fstat 80
#define __NR_sync 81
#define __NR_fsync 82
@@ -242,7 +242,6 @@
#define __NR_perf_event_open 241
#define __NR_accept4 242
#define __NR_recvmmsg 243
-#define __NR_or1k_atomic 244
#define __NR_wait4 260
#define __NR_prlimit64 261
#define __NR_fanotify_init 262
diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in
index 9b129b23..0096fe7c 100644
--- a/arch/arm/bits/syscall.h.in
+++ b/arch/arm/bits/syscall.h.in
@@ -224,6 +224,7 @@
#define __NR_tgkill 268
#define __NR_utimes 269
#define __NR_fadvise64_64 270
+#define __NR_arm_fadvise64_64 270
#define __NR_pciconfig_iobase 271
#define __NR_pciconfig_read 272
#define __NR_pciconfig_write 273
@@ -295,6 +296,7 @@
#define __NR_get_robust_list 339
#define __NR_splice 340
#define __NR_sync_file_range2 341
+#define __NR_arm_sync_file_range 341
#define __NR_tee 342
#define __NR_vmsplice 343
#define __NR_move_pages 344
diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in
index 3a1d9270..1217f89a 100644
--- a/arch/i386/bits/syscall.h.in
+++ b/arch/i386/bits/syscall.h.in
@@ -218,7 +218,6 @@
#define __NR_pivot_root 217
#define __NR_mincore 218
#define __NR_madvise 219
-#define __NR_madvise1 219
#define __NR_getdents64 220
#define __NR_fcntl64 221
/* 223 is unused */
diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in
index 109fcdeb..e5f928e3 100644
--- a/arch/microblaze/bits/syscall.h.in
+++ b/arch/microblaze/bits/syscall.h.in
@@ -178,8 +178,8 @@
#define __NR_rt_sigtimedwait 177
#define __NR_rt_sigqueueinfo 178
#define __NR_rt_sigsuspend 179
-#define __NR_pread 180
-#define __NR_pwrite 181
+#define __NR_pread64 180
+#define __NR_pwrite64 181
#define __NR_chown 182
#define __NR_getcwd 183
#define __NR_capget 184
@@ -246,7 +246,7 @@
#define __NR_io_getevents 247
#define __NR_io_submit 248
#define __NR_io_cancel 249
-#define __NR_fadvise 250
+#define __NR_fadvise64 250
#define __NR_exit_group 252
#define __NR_lookup_dcookie 253
#define __NR_epoll_create 254
@@ -294,7 +294,7 @@
#define __NR_mknodat 297
#define __NR_fchownat 298
#define __NR_futimesat 299
-#define __NR_fstatat 300
+#define __NR_fstatat64 300
#define __NR_unlinkat 301
#define __NR_renameat 302
#define __NR_linkat 303
diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in
index 6c9b3d8c..1a2147a7 100644
--- a/arch/mips/bits/syscall.h.in
+++ b/arch/mips/bits/syscall.h.in
@@ -140,7 +140,7 @@
#define __NR_setfsgid 4139
#define __NR__llseek 4140
#define __NR_getdents 4141
-#define __NR_select 4142
+#define __NR__newselect 4142
#define __NR_flock 4143
#define __NR_msync 4144
#define __NR_readv 4145
@@ -198,8 +198,8 @@
#define __NR_rt_sigtimedwait 4197
#define __NR_rt_sigqueueinfo 4198
#define __NR_rt_sigsuspend 4199
-#define __NR_pread 4200
-#define __NR_pwrite 4201
+#define __NR_pread64 4200
+#define __NR_pwrite64 4201
#define __NR_chown 4202
#define __NR_getcwd 4203
#define __NR_capget 4204
@@ -252,7 +252,7 @@
#define __NR_remap_file_pages 4251
#define __NR_set_tid_address 4252
#define __NR_restart_syscall 4253
-#define __NR_fadvise 4254
+#define __NR_fadvise64 4254
#define __NR_statfs64 4255
#define __NR_fstatfs64 4256
#define __NR_timer_create 4257
@@ -290,7 +290,7 @@
#define __NR_mknodat 4290
#define __NR_fchownat 4291
#define __NR_futimesat 4292
-#define __NR_fstatat 4293
+#define __NR_fstatat64 4293
#define __NR_unlinkat 4294
#define __NR_renameat 4295
#define __NR_linkat 4296
diff --git a/arch/mips/syscall_arch.h b/arch/mips/syscall_arch.h
index 3ac4da21..666f413f 100644
--- a/arch/mips/syscall_arch.h
+++ b/arch/mips/syscall_arch.h
@@ -99,7 +99,7 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
if (r7) return -r2;
long ret = r2;
if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
- if (n == SYS_fstatat) __stat_fix(c);
+ if (n == SYS_fstatat64) __stat_fix(c);
return ret;
}
@@ -108,7 +108,7 @@ static inline long __syscall5(long n, long a, long b, long c, long d, long e)
long r2 = (__syscall)(n, a, b, c, d, e);
if (r2 > -4096UL) return r2;
if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
- if (n == SYS_fstatat) __stat_fix(c);
+ if (n == SYS_fstatat64) __stat_fix(c);
return r2;
}
@@ -117,7 +117,7 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
long r2 = (__syscall)(n, a, b, c, d, e, f);
if (r2 > -4096UL) return r2;
if (n == SYS_stat64 || n == SYS_fstat64 || n == SYS_lstat64) __stat_fix(b);
- if (n == SYS_fstatat) __stat_fix(c);
+ if (n == SYS_fstatat64) __stat_fix(c);
return r2;
}
diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in
index d6b24e8f..cd843a76 100644
--- a/arch/mipsn32/bits/syscall.h.in
+++ b/arch/mipsn32/bits/syscall.h.in
@@ -253,7 +253,7 @@
#define __NR_mknodat 6253
#define __NR_fchownat 6254
#define __NR_futimesat 6255
-#define __NR_fstatat 6256
+#define __NR_newfstatat 6256
#define __NR_unlinkat 6257
#define __NR_renameat 6258
#define __NR_linkat 6259
diff --git a/arch/mipsn32/syscall_arch.h b/arch/mipsn32/syscall_arch.h
index 37e71a7e..93a026f6 100644
--- a/arch/mipsn32/syscall_arch.h
+++ b/arch/mipsn32/syscall_arch.h
@@ -97,7 +97,7 @@ static inline long __syscall4(long n, long a, long b, long c, long d)
if (r7) return -r2;
long ret = r2;
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat) __stat_fix(b);
- if (n == SYS_fstatat) __stat_fix(c);
+ if (n == SYS_newfstatat) __stat_fix(c);
return ret;
}
@@ -106,7 +106,7 @@ static inline long __syscall5(long n, long a, long b, long c, long d, long e)
long r2 = (__syscall)(n, a, b, c, d, e);
if (r2 > -4096UL) return r2;
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat) __stat_fix(b);
- if (n == SYS_fstatat) __stat_fix(c);
+ if (n == SYS_newfstatat) __stat_fix(c);
return r2;
}
@@ -115,7 +115,7 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
long r2 = (__syscall)(n, a, b, c, d, e, f);
if (r2 > -4096UL) return r2;
if (n == SYS_stat || n == SYS_fstat || n == SYS_lstat) __stat_fix(b);
- if (n == SYS_fstatat) __stat_fix(c);
+ if (n == SYS_newfstatat) __stat_fix(c);
return r2;
}
diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in
index 89788a9d..54581fb4 100644
--- a/arch/or1k/bits/syscall.h.in
+++ b/arch/or1k/bits/syscall.h.in
@@ -61,6 +61,7 @@
#define __NR_quotactl 60
#define __NR_getdents64 61
#define __NR__llseek 62
+#define __NR_llseek 62
#define __NR_read 63
#define __NR_write 64
#define __NR_readv 65
diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in
index 9d022321..35f7033e 100644
--- a/arch/powerpc/bits/syscall.h.in
+++ b/arch/powerpc/bits/syscall.h.in
@@ -162,16 +162,12 @@
#define __NR_sched_rr_get_interval 161
#define __NR_nanosleep 162
#define __NR_mremap 163
-#define __NR_setresuid32 164
#define __NR_setresuid 164
-#define __NR_getresuid32 165
#define __NR_getresuid 165
#define __NR_query_module 166
#define __NR_poll 167
#define __NR_nfsservctl 168
-#define __NR_setresgid32 169
#define __NR_setresgid 169
-#define __NR_getresgid32 170
#define __NR_getresgid 170
#define __NR_prctl 171
#define __NR_rt_sigreturn 172
@@ -306,7 +302,6 @@
#define __NR_epoll_pwait 303
#define __NR_utimensat 304
#define __NR_signalfd 305
-#define __NR_timerfd 306
#define __NR_timerfd_create 306
#define __NR_eventfd 307
#define __NR_sync_file_range2 308
--
2.13.3
|