diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/socketpair.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/socketpair.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/socketpair.c b/sysdeps/unix/sysv/linux/socketpair.c index cb70bcf1f0..6523a8aa73 100644 --- a/sysdeps/unix/sysv/linux/socketpair.c +++ b/sysdeps/unix/sysv/linux/socketpair.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Free Software Foundation, Inc. +/* Copyright (C) 2015-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,10 +20,16 @@ #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]); +#else return SOCKETCALL (socketpair, domain, type, protocol, sv); +#endif } weak_alias (__socketpair, socketpair) |