From e89e3af8f64bded3920f046fb8db2b95a188ff55 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 13 Nov 2015 06:13:42 +0100 Subject: i386: use socketcall even if newer linux exposes direct syscalls The changeset 9dea5dc921b5f4045a18c63eb92e84dc274d17eb in the Linux kernel expose the direct syscalls for sockets. For example udhcpc then will use sendto syscall directly and get an EINVAL error. Disable direct syscalls as it was done for SPARC in the past. Musl and GNU libc are not affected, as they already disable direct socket syscalls on i386. Reported-by: Gustavo Zacarias --- libc/inet/socketcalls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/inet') diff --git a/libc/inet/socketcalls.c b/libc/inet/socketcalls.c index 6f4054b7d..1fef8100b 100644 --- a/libc/inet/socketcalls.c +++ b/libc/inet/socketcalls.c @@ -31,7 +31,8 @@ #define SYS_ACCEPT4 18 #endif -#ifdef __sparc__ +/* exposed on x86 since Linux commit 9dea5dc921b5f4045a18c63eb92e84dc274d17eb */ +#if defined(__sparc__) || defined(__i386__) #undef __NR_accept #undef __NR_accept4 #undef __NR_bind -- cgit v1.2.3