diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2016-11-17 18:15:52 -0200 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.com> | 2017-03-09 15:22:06 +0100 |
commit | 3e9ff426cb6fe7e1733d914af3114e04e98dbedd (patch) | |
tree | f5d26689f4058a44e0f3d6b7b7eaabae5504152d /sysdeps/unix/sysv/linux/connect.c | |
parent | Consolidate Linux accept implementation (diff) | |
download | glibc-3e9ff426cb6fe7e1733d914af3114e04e98dbedd.tar.gz glibc-3e9ff426cb6fe7e1733d914af3114e04e98dbedd.tar.bz2 glibc-3e9ff426cb6fe7e1733d914af3114e04e98dbedd.zip |
Consolidate Linux connect implementation
This patch consolidates the connect Linux syscall implementation on
sysdeps/unix/sysv/linux/accept.c. The changes are:
1. Remove connect from auto-generation syscalls.list on the architecture
that uses __NR_connect.
2. Define __NR_connect as default (__ASSUME_CONNECT_SYSCALL) and undef for
architectures that do not support it.
Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove connect from
auto-generation list.
* sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/connect.c: Simplify include list.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_CONNECT_SYSCALL): Define.
* sysdeps/unix/sysv/linux/i386/kernel-features.h
(__ASSUME_CONNECT_SYSCALL): Undef if kernel does not support it.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_CONNECT_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/s390/kernel-features.h
(__ASSUME_CONNECT_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/sparc/kernel-features.h
(__ASSUME_CONNECT_SYSCALL): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/connect.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/connect.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/connect.c b/sysdeps/unix/sysv/linux/connect.c index 3837a5bea0..f6ab5df6ad 100644 --- a/sysdeps/unix/sysv/linux/connect.c +++ b/sysdeps/unix/sysv/linux/connect.c @@ -15,14 +15,9 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <errno.h> -#include <signal.h> #include <sys/socket.h> - #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) |