diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_connect.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_connect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_connect.c b/lib/libc_r/uthread/uthread_connect.c index 9612e1f20f4d6..a3fe75f26ef91 100644 --- a/lib/libc_r/uthread/uthread_connect.c +++ b/lib/libc_r/uthread/uthread_connect.c @@ -49,9 +49,9 @@ _connect(int fd, const struct sockaddr * name, socklen_t namelen) if ((ret = _FD_LOCK(fd, FD_RDWR, NULL)) == 0) { if ((ret = __sys_connect(fd, name, namelen)) < 0) { - if (!(_thread_fd_table[fd]->flags & O_NONBLOCK) && - ((errno == EWOULDBLOCK) || (errno == EINPROGRESS) || - (errno == EALREADY) || (errno == EAGAIN))) { + if ((_thread_fd_getflags(fd) & O_NONBLOCK) == 0 + && ((errno == EWOULDBLOCK) || (errno == EINPROGRESS) + || (errno == EALREADY) || (errno == EAGAIN))) { curthread->data.fd.fd = fd; /* Set the timeout: */ |