accept.c 569 B

1234567891011121314151617181920212223
  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. #include <sys/socket.h>
  6. #include <cancel.h>
  7. #ifndef __NR_accept
  8. #error Missing definition of NR_accept needed for cancellation.
  9. #endif
  10. int
  11. accept (int fd, __SOCKADDR_ARG addr, socklen_t *len)
  12. {
  13. return _syscall3(int, __NC(accept), int, fd, __SOCKADDR_ARG,
  14. addr.__sockaddr__, socklen_t*, len);
  15. }
  16. CANCELLABLE_SYSCALL(int, accept, (int fd, __SOCKADDR_ARG addr,
  17. socklen_t *len), (fd, addr, len))
  18. lt_libc_hidden(accept)