aboutsummaryrefslogtreecommitdiff
path: root/lib/libc_r/uthread/uthread_socket.c
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2001-01-24 13:03:38 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2001-01-24 13:03:38 +0000
commite5106342c6de9cbe26c4827e4e29bae309cd8cfb (patch)
tree5199387f09deaa21f12482317c165f815c4e8c2b /lib/libc_r/uthread/uthread_socket.c
parentf9447cd11209a5fb5ecef3f4cbe539e990f3b1bd (diff)
Notes
Diffstat (limited to 'lib/libc_r/uthread/uthread_socket.c')
-rw-r--r--lib/libc_r/uthread/uthread_socket.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/libc_r/uthread/uthread_socket.c b/lib/libc_r/uthread/uthread_socket.c
index 5cd8f7566e26..cbbbe82a120d 100644
--- a/lib/libc_r/uthread/uthread_socket.c
+++ b/lib/libc_r/uthread/uthread_socket.c
@@ -35,26 +35,24 @@
#include <sys/socket.h>
#include <fcntl.h>
#include <unistd.h>
-#ifdef _THREAD_SAFE
#include <pthread.h>
#include "pthread_private.h"
+#pragma weak socket=_socket
+
int
_socket(int af, int type, int protocol)
{
int fd;
/* Create a socket: */
- if ((fd = _thread_sys_socket(af, type, protocol)) < 0) {
+ if ((fd = __sys_socket(af, type, protocol)) < 0) {
/* Error creating socket. */
/* Initialise the entry in the file descriptor table: */
} else if (_thread_fd_table_init(fd) != 0) {
- _thread_sys_close(fd);
+ __sys_close(fd);
fd = -1;
}
return (fd);
}
-
-__strong_reference(_socket, socket);
-#endif