summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/connect.c')
-rw-r--r--sysdeps/unix/sysv/linux/connect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/connect.c b/sysdeps/unix/sysv/linux/connect.c
index dd17e8ca97..d62e4d7c9e 100644
--- a/sysdeps/unix/sysv/linux/connect.c
+++ b/sysdeps/unix/sysv/linux/connect.c
@@ -21,11 +21,17 @@
 
 #include <sysdep-cancel.h>
 #include <socketcall.h>
+#include <kernel-features.h>
+#include <sys/syscall.h>
 
 int
 __libc_connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len)
 {
+#ifdef __ASSUME_CONNECT_SYSCALL
+  return SYSCALL_CANCEL (connect, fd, addr.__sockaddr__, len);
+#else
   return SOCKETCALL_CANCEL (connect, fd, addr.__sockaddr__, len);
+#endif
 }
 weak_alias (__libc_connect, connect)
 weak_alias (__libc_connect, __connect)