diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_setsockopt.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_setsockopt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc_r/uthread/uthread_setsockopt.c b/lib/libc_r/uthread/uthread_setsockopt.c index f50a708..f2e1a13 100644 --- a/lib/libc_r/uthread/uthread_setsockopt.c +++ b/lib/libc_r/uthread/uthread_setsockopt.c @@ -33,10 +33,11 @@ */ #include <sys/types.h> #include <sys/socket.h> -#ifdef _THREAD_SAFE #include <pthread.h> #include "pthread_private.h" +#pragma weak setsockopt=_setsockopt + int _setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen) @@ -44,11 +45,8 @@ _setsockopt(int fd, int level, int optname, const void *optval, socklen_t int ret; if ((ret = _FD_LOCK(fd, FD_RDWR, NULL)) == 0) { - ret = _thread_sys_setsockopt(fd, level, optname, optval, optlen); + ret = __sys_setsockopt(fd, level, optname, optval, optlen); _FD_UNLOCK(fd, FD_RDWR); } return ret; } - -__strong_reference(_setsockopt, setsockopt); -#endif |