summaryrefslogtreecommitdiff
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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/connect.c b/sysdeps/unix/sysv/linux/connect.c
index dd17e8ca97..5fe84d38f7 100644
--- a/sysdeps/unix/sysv/linux/connect.c
+++ b/sysdeps/unix/sysv/linux/connect.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
@@ -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)