diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_socket.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_socket.c | 10 |
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 5cd8f75..cbbbe82 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 |