summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/stubs.c94
1 files changed, 94 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
index d9379874a..1aa07de36 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -31,6 +31,32 @@ static int enosys_stub(void)
# undef __NR_sync_file_range
#endif
+#ifndef __UCLIBC_HAS_SOCKET__
+# undef __NR_accept
+# undef __NR_accept4
+# undef __NR_bind
+# undef __NR_connect
+# undef __NR_getpeername
+# undef __NR_getsockname
+# undef __NR_getsockopt
+# undef __NR_listen
+# undef __NR_recv
+# undef __NR_recvfrom
+# undef __NR_recvmsg
+# undef __NR_send
+# undef __NR_sendmsg
+# undef __NR_sendto
+# undef __NR_setsockopt
+# undef __NR_shutdown
+# undef __NR_socket
+# undef __NR_socketcall
+# undef __NR_socketpair
+#endif
+
+#ifndef __NR_accept
+make_stub(accept)
+#endif
+
#ifndef __NR_accept4
make_stub(accept4)
#endif
@@ -39,6 +65,10 @@ make_stub(accept4)
make_stub(bdflush)
#endif
+#ifndef __NR_bind
+make_stub(bind)
+#endif
+
#ifndef __NR_capget
make_stub(capget)
#endif
@@ -47,6 +77,10 @@ make_stub(capget)
make_stub(capset)
#endif
+#ifndef __NR_connect
+make_stub(connect)
+#endif
+
#ifndef __NR_create_module
make_stub(create_module)
#endif
@@ -95,10 +129,22 @@ make_stub(fsetxattr)
make_stub(get_kernel_syms)
#endif
+#ifndef __NR_getpeername
+make_stub(getpeername)
+#endif
+
#if !defined(__NR_getpgrp) && (defined(__NR_getpgid) && (defined(__NR_getpid) || defined(__NR_getxpid)))
make_stub(getpgrp)
#endif
+#ifndef __NR_getsockname
+make_stub(getsockname)
+#endif
+
+#ifndef __NR_getsockopt
+make_stub(getsockopt)
+#endif
+
#ifndef __NR_getxattr
make_stub(getxattr)
#endif
@@ -111,6 +157,10 @@ make_stub(init_module)
make_stub(lgetxattr)
#endif
+#ifndef __NR_listen
+make_stub(listen)
+#endif
+
#ifndef __NR_listxattr
make_stub(listxattr)
#endif
@@ -135,6 +185,18 @@ make_stub(pivot_root)
make_stub(query_module)
#endif
+#ifndef __NR_recv
+make_stub(recv)
+#endif
+
+#ifndef __NR_recvfrom
+make_stub(recvfrom)
+#endif
+
+#ifndef __NR_recvmsg
+make_stub(recvmsg)
+#endif
+
#ifndef __NR_removexattr
make_stub(removexattr)
#endif
@@ -147,14 +209,46 @@ make_stub(sched_getaffinity)
make_stub(sched_setaffinity)
#endif
+#ifndef __NR_send
+make_stub(send)
+#endif
+
+#ifndef __NR_sendmsg
+make_stub(sendmsg)
+#endif
+
+#ifndef __NR_sendto
+make_stub(sendto)
+#endif
+
+#ifndef __NR_setsockopt
+make_stub(setsockopt)
+#endif
+
#ifndef __NR_setxattr
make_stub(setxattr)
#endif
+#ifndef __NR_shutdown
+make_stub(shutdown)
+#endif
+
#if !defined(__NR_signalfd4) && !defined(__NR_signalfd)
make_stub(signalfd)
#endif
+#ifndef __NR_socket
+make_stub(socket)
+#endif
+
+#ifndef __NR_socketcall
+make_stub(socketcall)
+#endif
+
+#ifndef __NR_socketpair
+make_stub(socketpair)
+#endif
+
#ifndef __NR_rt_sigtimedwait
make_stub(sigtimedwait)
make_stub(sigwaitinfo)