From 9cea3775056d0a8d04d49c3983440b89d82a462b Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Mon, 31 Mar 2014 11:23:39 -0700 Subject: [PATCH] Small accept4 fixes. Put the accept4 test in the sorted order, and put the accept4 define in sorted order. Also add the missing SYS_RECVMMSG and SYS_SENDMMSG defines. Change-Id: Iba55354975e0d5027dbee53f6de752c2df719493 --- libc/include/sys/socket.h | 2 +- libc/include/sys/socketcalls.h | 2 ++ tests/Android.mk | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h index 5001b2e95..86fd3cf5c 100644 --- a/libc/include/sys/socket.h +++ b/libc/include/sys/socket.h @@ -284,6 +284,7 @@ struct ucred { #endif __socketcall int accept(int, struct sockaddr*, socklen_t*); +__socketcall int accept4(int, struct sockaddr*, socklen_t*, int); __socketcall int bind(int, const struct sockaddr*, int); __socketcall int connect(int, const struct sockaddr*, socklen_t); __socketcall int getpeername(int, struct sockaddr*, socklen_t*); @@ -298,7 +299,6 @@ __socketcall int setsockopt(int, int, int, const void*, socklen_t); __socketcall int shutdown(int, int); __socketcall int socket(int, int, int); __socketcall int socketpair(int, int, int, int*); -__socketcall int accept4(int, struct sockaddr*, socklen_t*, int); extern ssize_t send(int, const void*, size_t, int); extern ssize_t recv(int, void*, size_t, int); diff --git a/libc/include/sys/socketcalls.h b/libc/include/sys/socketcalls.h index 09c079f66..131e0bba0 100644 --- a/libc/include/sys/socketcalls.h +++ b/libc/include/sys/socketcalls.h @@ -48,5 +48,7 @@ #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ #define SYS_ACCEPT4 18 /* sys_accept4(2) */ +#define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ +#define SYS_SENDMMSG 20 /* sys_sendmmsg(2) */ #endif /* _SYS_SOCKETCALLS_H_ */ diff --git a/tests/Android.mk b/tests/Android.mk index 788dbcf0f..1aec0215f 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -39,6 +39,7 @@ test_cflags = \ -fno-builtin \ libBionicStandardTests_src_files := \ + accept4_test.cpp \ buffer_tests.cpp \ dirent_test.cpp \ eventfd_test.cpp \ @@ -82,7 +83,6 @@ libBionicStandardTests_src_files := \ system_properties_test.cpp \ time_test.cpp \ unistd_test.cpp \ - accept4_test.cpp \ libBionicStandardTests_cflags := \ $(test_cflags) \