aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/recv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/recv.c')
-rw-r--r--sysdeps/unix/sysv/linux/recv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/recv.c b/sysdeps/unix/sysv/linux/recv.c
index cd2bc1e..12be890 100644
--- a/sysdeps/unix/sysv/linux/recv.c
+++ b/sysdeps/unix/sysv/linux/recv.c
@@ -21,11 +21,17 @@
#include <sysdep-cancel.h>
#include <socketcall.h>
+#include <kernel-features.h>
+#include <sys/syscall.h>
ssize_t
__libc_recv (int fd, void *buf, size_t len, int flags)
{
+#ifdef __ASSUME_RECV_SYSCALL
+ return SYSCALL_CANCEL (recv, fd, buf, len, flags);
+#else
return SOCKETCALL_CANCEL (recv, fd, buf, len, flags);
+#endif
}
weak_alias (__libc_recv, recv)
weak_alias (__libc_recv, __recv)