diff options
-rw-r--r-- | lib/libc/net/recv.c | 8 | ||||
-rw-r--r-- | lib/libc/net/send.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/libc/net/recv.c b/lib/libc/net/recv.c index c8230d6..f71d478 100644 --- a/lib/libc/net/recv.c +++ b/lib/libc/net/recv.c @@ -33,12 +33,10 @@ static char sccsid[] = "@(#)recv.c 8.2 (Berkeley) 2/21/94"; #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "namespace.h" #include <sys/types.h> #include <sys/socket.h> #include <stddef.h> -#include "un-namespace.h" ssize_t recv(s, buf, len, flags) @@ -46,5 +44,9 @@ recv(s, buf, len, flags) size_t len; void *buf; { - return (_recvfrom(s, buf, len, flags, NULL, 0)); + /* + * POSIX says recv() shall be a cancellation point, so call the + * cancellation-enabled recvfrom() and not _recvfrom(). + */ + return (recvfrom(s, buf, len, flags, NULL, 0)); } diff --git a/lib/libc/net/send.c b/lib/libc/net/send.c index 101b0ce..93cdfda 100644 --- a/lib/libc/net/send.c +++ b/lib/libc/net/send.c @@ -33,12 +33,10 @@ static char sccsid[] = "@(#)send.c 8.2 (Berkeley) 2/21/94"; #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "namespace.h" #include <sys/types.h> #include <sys/socket.h> #include <stddef.h> -#include "un-namespace.h" ssize_t send(s, msg, len, flags) @@ -46,5 +44,9 @@ send(s, msg, len, flags) size_t len; const void *msg; { - return (_sendto(s, msg, len, flags, NULL, 0)); + /* + * POSIX says send() shall be a cancellation point, so call the + * cancellation-enabled sendto() and not _sendto(). + */ + return (sendto(s, msg, len, flags, NULL, 0)); } |