summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-10-04 07:17:28 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-10-04 07:17:28 +0000
commitdf6000b5e199793ee64e1b43fb7c2027afc6ae8b (patch)
treee3a463745158d55e422bf5abcac7f7a7993dd062 /lib
parent32487f5fedf88a3fc4e06077b235a0c1916b068e (diff)
recv() and send() aren't overriden by libpthread (vs recvfrom() and sendto()!)
so wrap them to make internal calls go direct
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/hidden/sys/socket.h4
-rw-r--r--lib/libc/net/recv.c3
-rw-r--r--lib/libc/net/send.c3
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/hidden/sys/socket.h b/lib/libc/hidden/sys/socket.h
index 9d2227d157c..d262e0f3bac 100644
--- a/lib/libc/hidden/sys/socket.h
+++ b/lib/libc/hidden/sys/socket.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: socket.h,v 1.2 2015/10/04 07:14:48 guenther Exp $ */
+/* $OpenBSD: socket.h,v 1.3 2015/10/04 07:17:27 guenther Exp $ */
/*
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
*
@@ -27,6 +27,8 @@ PROTO_NORMAL(getrtable);
PROTO_NORMAL(getsockname);
PROTO_NORMAL(getsockopt);
PROTO_NORMAL(listen);
+PROTO_NORMAL(recv);
+PROTO_NORMAL(send);
PROTO_NORMAL(setrtable);
PROTO_NORMAL(setsockopt);
PROTO_NORMAL(shutdown);
diff --git a/lib/libc/net/recv.c b/lib/libc/net/recv.c
index 6241cc6b12f..365d0e2e193 100644
--- a/lib/libc/net/recv.c
+++ b/lib/libc/net/recv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: recv.c,v 1.5 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: recv.c,v 1.6 2015/10/04 07:17:27 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -38,3 +38,4 @@ recv(int s, void *buf, size_t len, int flags)
{
return (recvfrom(s, buf, len, flags, NULL, 0));
}
+DEF_WEAK(recv);
diff --git a/lib/libc/net/send.c b/lib/libc/net/send.c
index 1bfc80b87a5..1fad3bd171f 100644
--- a/lib/libc/net/send.c
+++ b/lib/libc/net/send.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: send.c,v 1.5 2005/08/06 20:30:04 espie Exp $ */
+/* $OpenBSD: send.c,v 1.6 2015/10/04 07:17:27 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -38,3 +38,4 @@ send(int s, const void *msg, size_t len, int flags)
{
return (sendto(s, msg, len, flags, NULL, 0));
}
+DEF_WEAK(send);