wut/libraries/wutsocket/sendto.c
2021-03-07 13:09:12 +01:00

20 lines
408 B
C

#include "wut_socket.h"
ssize_t
sendto(int sockfd,
const void *buf,
size_t len,
int flags,
const struct sockaddr *dest_addr,
socklen_t addrlen)
{
int rc;
sockfd = __wut_get_nsysnet_fd(sockfd);
if (sockfd == -1) {
return -1;
}
rc = RPLWRAP(sendto)(sockfd, buf, len, flags, dest_addr, addrlen);
return (ssize_t)__wut_get_nsysnet_result(NULL, rc);
}