summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/socketpair.c
diff options
context:
space:
mode:
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>2022-10-19 19:14:23 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-12-07 14:11:49 -0300
commitd00783653a56020be669c304f18d39c10dc9eae9 (patch)
tree8c76dea0372fe5aaae75886ecec504350ba6a1be /sysdeps/unix/sysv/linux/socketpair.c
parent1fed1a5af46fa64d63a7ab7166521b4c1be56007 (diff)
downloadglibc-d00783653a56020be669c304f18d39c10dc9eae9.tar
glibc-d00783653a56020be669c304f18d39c10dc9eae9.tar.gz
glibc-d00783653a56020be669c304f18d39c10dc9eae9.tar.bz2
glibc-d00783653a56020be669c304f18d39c10dc9eae9.zip
Linux: Assume and consolidate socketpair wire-up syscall
And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/socketpair.c')
-rw-r--r--sysdeps/unix/sysv/linux/socketpair.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/socketpair.c b/sysdeps/unix/sysv/linux/socketpair.c
index d06cbbc2c9..65f8cb46dc 100644
--- a/sysdeps/unix/sysv/linux/socketpair.c
+++ b/sysdeps/unix/sysv/linux/socketpair.c
@@ -15,19 +15,14 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <signal.h>
#include <sys/socket.h>
-
#include <socketcall.h>
-#include <kernel-features.h>
-#include <sys/syscall.h>
int
__socketpair (int domain, int type, int protocol, int sv[2])
{
#ifdef __ASSUME_SOCKETPAIR_SYSCALL
- return INLINE_SYSCALL (socketpair, 4, domain, type, protocol, &sv[0]);
+ return INLINE_SYSCALL_CALL (socketpair, domain, type, protocol, &sv[0]);
#else
return SOCKETCALL (socketpair, domain, type, protocol, sv);
#endif