summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_recvfrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_recvfrom.c')
-rw-r--r--lib/libc_r/uthread/uthread_recvfrom.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_recvfrom.c b/lib/libc_r/uthread/uthread_recvfrom.c
index d6f8da1..e18d449 100644
--- a/lib/libc_r/uthread/uthread_recvfrom.c
+++ b/lib/libc_r/uthread/uthread_recvfrom.c
@@ -38,7 +38,7 @@
#include <pthread.h>
#include "pthread_private.h"
-__weak_reference(_recvfrom, recvfrom);
+__weak_reference(__recvfrom, recvfrom);
ssize_t
_recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from,
@@ -74,3 +74,16 @@ _recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from,
}
return (ret);
}
+
+ssize_t
+__recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from,
+ socklen_t *from_len)
+{
+ int ret;
+
+ _thread_enter_cancellation_point();
+ ret = _recvfrom(fd, buf, len, flags, from, from_len);
+ _thread_leave_cancellation_point();
+
+ return (ret);
+}
OpenPOWER on IntegriCloud