1 /*
2 * Copyright (C) 2017 Waldemar Brodkorb <wbx@uclibc-ng.org>
3 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
4 */
5
6 #include <sys/socket.h>
7 #include <cancel.h>
8
9 #ifndef __NR_connect
10 #error Missing definition of NR_connect needed for cancellation.
11 #endif
12
13 int
connect(int fd,__CONST_SOCKADDR_ARG addr,socklen_t len)14 connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len)
15 {
16 return _syscall3(int, __NC(connect), int, fd, __CONST_SOCKADDR_ARG,
17 addr.__sockaddr__, socklen_t, len);
18 }
19
20 CANCELLABLE_SYSCALL(int, connect, (int fd, __CONST_SOCKADDR_ARG addr,
21 socklen_t len), (fd, addr, len))
22
23 lt_libc_hidden(connect)
24