nptl: remove sysdep-cancel ASM macros, convert to C
[uclibc-ng.git] / libpthread / nptl / sysdeps / unix / sysv / linux / accept.c
blobedc11037156525440145dab36d310c53d310fb93
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 */
6 #include <sys/socket.h>
7 #include <cancel.h>
9 #ifndef __NR_accept
10 #error Missing definition of NR_accept needed for cancellation.
11 #endif
13 int
14 accept (int fd, __SOCKADDR_ARG addr, socklen_t *len)
16 return _syscall3(int, __NC(accept), int, fd, __SOCKADDR_ARG,
17 addr.__sockaddr__, socklen_t*, len);
20 CANCELLABLE_SYSCALL(int, accept, (int fd, __SOCKADDR_ARG addr,
21 socklen_t *len), (fd, addr, len))
23 lt_libc_hidden(accept)