summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-11-13 06:13:42 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2015-11-13 06:22:30 +0100
commite89e3af8f64bded3920f046fb8db2b95a188ff55 (patch)
tree187ccbb765e8b4622c9f560f3b665882cb475d7f /libc
parent1780cf1823bc36a9588b86c87f965bd298c2b4f9 (diff)
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 <gustavo@zacarias.com.ar>
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/socketcalls.c3
1 files changed, 2 insertions, 1 deletions
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