sendmsg.c 575 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_sendmsg
  8. #error Missing definition of NR_sendmsg needed for cancellation.
  9. #endif
  10. ssize_t
  11. sendmsg (int fd, const struct msghdr *msg, int flags)
  12. {
  13. return _syscall3(ssize_t, __NC(sendmsg), int, fd, const struct msghdr*, msg,
  14. int, flags);
  15. }
  16. CANCELLABLE_SYSCALL(ssize_t, sendmsg, (int fd, const struct msghdr *msg,
  17. int flags), (fd, msg, flags))
  18. lt_libc_hidden(sendmsg)