summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/recv.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2015-05-10 14:50:50 +0000
committerjilles <jilles@FreeBSD.org>2015-05-10 14:50:50 +0000
commit8ae6fa0eb6d5fbd0626127be3f6d2cd2b3d604f6 (patch)
treed23dd39cd7c5c54bd6d8420fb92181e752c10a24 /lib/libc/net/recv.c
parentae16c5888fa9049056aa37f505c476a3d071c4c5 (diff)
downloadFreeBSD-src-8ae6fa0eb6d5fbd0626127be3f6d2cd2b3d604f6.zip
FreeBSD-src-8ae6fa0eb6d5fbd0626127be3f6d2cd2b3d604f6.tar.gz
recv(),send(): Directly call interposing entry instead of going through PLT.
recv() and send()'s calls to recvfrom() and sendto() are much like waitpid()'s call to wait4(), and likewise need not allow PLT interposing on the called function.
Diffstat (limited to 'lib/libc/net/recv.c')
-rw-r--r--lib/libc/net/recv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/net/recv.c b/lib/libc/net/recv.c
index f71d478..6a584ca 100644
--- a/lib/libc/net/recv.c
+++ b/lib/libc/net/recv.c
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/socket.h>
+#include "libc_private.h"
#include <stddef.h>
@@ -48,5 +49,8 @@ recv(s, buf, len, flags)
* 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));
+ return (((ssize_t (*)(int, void *, size_t, int,
+ struct sockaddr *, socklen_t *))
+ __libc_interposing[INTERPOS_recvfrom])(s, buf, len, flags,
+ NULL, NULL));
}
OpenPOWER on IntegriCloud