diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_sendmsg.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_sendmsg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_sendmsg.c b/lib/libc_r/uthread/uthread_sendmsg.c index 5a3476bb8fa74..46f85cb4e2172 100644 --- a/lib/libc_r/uthread/uthread_sendmsg.c +++ b/lib/libc_r/uthread/uthread_sendmsg.c @@ -48,7 +48,8 @@ _sendmsg(int fd, const struct msghdr *msg, int flags) if ((ret = _FD_LOCK(fd, FD_WRITE, NULL)) == 0) { while ((ret = __sys_sendmsg(fd, msg, flags)) < 0) { - if (!(_thread_fd_table[fd]->flags & O_NONBLOCK) && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) { + if (!(_thread_fd_getflags(fd) & O_NONBLOCK) + && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) { curthread->data.fd.fd = fd; /* Set the timeout: */ |