1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/musl/socketcall.patch.x32
3 # Copyright (C) 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- musl-1.2.2/src/internal/syscall.h.vanilla 2021-10-20 18:50:54.028222342 +0200
15 +++ musl-1.2.2/src/internal/syscall.h 2021-10-20 19:38:41.265108017 +0200
17 #define __syscall_cp(...) __SYSCALL_DISP(__syscall_cp,__VA_ARGS__)
18 #define syscall_cp(...) __syscall_ret(__syscall_cp(__VA_ARGS__))
20 -static inline long __alt_socketcall(int sys, int sock, int cp, long a, long b, long c, long d, long e, long f)
21 +static inline long __alt_socketcall(int sys, int sock, int cp, long long a, long long b, long long c, long long d, long long e, long long f)
24 if (cp) r = __syscall_cp(sys, a, b, c, d, e, f);
25 else r = __syscall(sys, a, b, c, d, e, f);
26 if (r != -ENOSYS) return r;
28 - if (cp) r = __syscall_cp(SYS_socketcall, sock, ((long[6]){a, b, c, d, e, f}));
29 - else r = __syscall(SYS_socketcall, sock, ((long[6]){a, b, c, d, e, f}));
30 + if (cp) r = __syscall_cp(SYS_socketcall, sock, ((long long[6]){a, b, c, d, e, f}));
31 + else r = __syscall(SYS_socketcall, sock, ((long long[6]){a, b, c, d, e, f}));
35 -#define __socketcall(nm, a, b, c, d, e, f) __alt_socketcall(SYS_##nm, __SC_##nm, 0, \
36 - (long)(a), (long)(b), (long)(c), (long)(d), (long)(e), (long)(f))
37 -#define __socketcall_cp(nm, a, b, c, d, e, f) __alt_socketcall(SYS_##nm, __SC_##nm, 1, \
38 - (long)(a), (long)(b), (long)(c), (long)(d), (long)(e), (long)(f))
39 +#define __socketcall(nm, a, b, c, d, e, f) __syscall(SYS_##nm, (a), (b), (c), (d), (e), (f))
40 +#define __socketcall_cp(nm, a, b, c, d, e, f) __syscall_cp(SYS_##nm, (a), (b), (c), (d), (e), (f))
42 /* fixup legacy 16-bit junk */