summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/getsockopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/getsockopt.c')
-rw-r--r--sysdeps/unix/sysv/linux/getsockopt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/getsockopt.c b/sysdeps/unix/sysv/linux/getsockopt.c
index ba5681b410..079fee1281 100644
--- a/sysdeps/unix/sysv/linux/getsockopt.c
+++ b/sysdeps/unix/sysv/linux/getsockopt.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
__getsockopt (int fd, int level, int optname, void *optval, socklen_t *len)
{
+#ifdef __ASSUME_GETSOCKOPT_SYSCALL
+ return INLINE_SYSCALL (getsockopt, 5, fd, level, optname, optval, len);
+#else
return SOCKETCALL (getsockopt, fd, level, optname, optval, len);
+#endif
}
weak_alias (__getsockopt, getsockopt)