aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/getpeername.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/getpeername.c')
-rw-r--r--sysdeps/unix/sysv/linux/getpeername.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/getpeername.c b/sysdeps/unix/sysv/linux/getpeername.c
index 05fd2e8..cd5725b 100644
--- a/sysdeps/unix/sysv/linux/getpeername.c
+++ b/sysdeps/unix/sysv/linux/getpeername.c
@@ -20,10 +20,16 @@
#include <sys/socket.h>
#include <socketcall.h>
+#include <kernel-features.h>
+#include <sys/syscall.h>
int
__getpeername (int fd, __SOCKADDR_ARG addr, socklen_t *len)
{
+#ifdef __ASSUME_GETPEERNAME_SYSCALL
+ return INLINE_SYSCALL (getpeername, 3, fd, addr.__sockaddr__, len);
+#else
return SOCKETCALL (getpeername, fd, addr.__sockaddr__, len);
+#endif
}
weak_alias (__getpeername, getpeername)