diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_writev.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_writev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_writev.c b/lib/libc_r/uthread/uthread_writev.c index 2a3c0c8..5ad1ce9 100644 --- a/lib/libc_r/uthread/uthread_writev.c +++ b/lib/libc_r/uthread/uthread_writev.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ writev(int fd, const struct iovec * iov, int iovcnt) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking writev syscall: */ while ((ret = _thread_sys_writev(fd, iov, iovcnt)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; |