about summary refs log tree commit diff
path: root/src/linux/accept4.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-08 20:22:08 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-08 20:22:08 -0400
commit6cf8bfdb646efaf76c75a95d1ea0cd254706c037 (patch)
treebc640847a316bb36ba69d81cc2b5230f55f905f0 /src/linux/accept4.c
parentb10d0230c1837be34e4ece7d6b11d19f1b578b9f (diff)
downloadmusl-6cf8bfdb646efaf76c75a95d1ea0cd254706c037.tar.gz
musl-6cf8bfdb646efaf76c75a95d1ea0cd254706c037.tar.xz
musl-6cf8bfdb646efaf76c75a95d1ea0cd254706c037.zip
add acct, accept4, setns, and dup3 syscalls (linux extensions)
based on patch by Justin Cormack
Diffstat (limited to 'src/linux/accept4.c')
-rw-r--r--src/linux/accept4.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/linux/accept4.c b/src/linux/accept4.c
new file mode 100644
index 00000000..6b5c16ce
--- /dev/null
+++ b/src/linux/accept4.c
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <sys/socket.h>
+#include "syscall.h"
+#include "libc.h"
+
+int accept4(int fd, struct sockaddr *restrict addr, socklen_t *restrict len, int flg)
+{
+	return socketcall_cp(accept4, fd, addr, len, flg, 0, 0);
+}