change the internal socketcall selection logic
authorSzabolcs Nagy <nsz@port70.net>
Mon, 25 Jan 2016 00:52:58 +0000 (00:52 +0000)
committerRich Felker <dalias@aerifal.cx>
Tue, 26 Jan 2016 23:27:44 +0000 (18:27 -0500)
only use SYS_socketcall if SYSCALL_USE_SOCKETCALL is defined
internally, otherwise use direct syscalls.

this commit does not change the current behaviour, it is
preparation for adding direct syscall numbers for i386.

arch/i386/syscall_arch.h
src/internal/syscall.h

index ca0ea7fb79d63963c95ab13d946df595ff994ec2..4c9d874aa3ebc6fa2da64cfdfd0d57d624d8b858 100644 (file)
@@ -55,3 +55,5 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a
 #define VDSO_USEFUL
 #define VDSO_CGT_SYM "__vdso_clock_gettime"
 #define VDSO_CGT_VER "LINUX_2.6"
+
+#define SYSCALL_USE_SOCKETCALL
index 36c772df6390c5c9bfe959a3b5567065b39bc4dc..ff3cf53a8cbed53f1d05862e0ee9d56ae345a5e5 100644 (file)
@@ -63,7 +63,7 @@ long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...),
 #define __syscall_cp(...) __SYSCALL_DISP(__syscall_cp,__VA_ARGS__)
 #define syscall_cp(...) __syscall_ret(__syscall_cp(__VA_ARGS__))
 
-#ifdef SYS_socket
+#ifndef SYSCALL_USE_SOCKETCALL
 #define __socketcall(nm,a,b,c,d,e,f) syscall(SYS_##nm, a, b, c, d, e, f)
 #define __socketcall_cp(nm,a,b,c,d,e,f) syscall_cp(SYS_##nm, a, b, c, d, e, f)
 #else