diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_recvfrom.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_recvfrom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_recvfrom.c b/lib/libc_r/uthread/uthread_recvfrom.c index 0643126752a8e..d6f8da1b99745 100644 --- a/lib/libc_r/uthread/uthread_recvfrom.c +++ b/lib/libc_r/uthread/uthread_recvfrom.c @@ -49,7 +49,8 @@ _recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from, if ((ret = _FD_LOCK(fd, FD_READ, NULL)) == 0) { while ((ret = __sys_recvfrom(fd, buf, len, flags, from, from_len)) < 0) { - if (!(_thread_fd_table[fd]->flags & O_NONBLOCK) && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) { + if (((_thread_fd_getflags(fd) & O_NONBLOCK) == 0) + && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) { curthread->data.fd.fd = fd; /* Set the timeout: */ |