summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/socketcalls.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/inet/socketcalls.c b/libc/inet/socketcalls.c
index f93d10952..35ab1d7a8 100644
--- a/libc/inet/socketcalls.c
+++ b/libc/inet/socketcalls.c
@@ -164,6 +164,12 @@ ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
return (__socketcall(SYS_RECV, args));
}
weak_alias(__libc_recv, recv);
+#elif defined(__NR_recvfrom)
+ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
+{
+ return (recvfrom(sockfd, buffer, len, flags, NULL, NULL));
+}
+weak_alias(__libc_recv, recv);
#endif
#endif
@@ -227,6 +233,12 @@ ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
return (__socketcall(SYS_SEND, args));
}
weak_alias(__libc_send, send);
+#elif defined(__NR_sendto)
+ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
+{
+ return (sendto(sockfd, buffer, len, flags, NULL, 0));
+}
+weak_alias(__libc_send, send);
#endif
#endif