diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-18 21:53:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-18 21:53:22 +0200 |
commit | f66a2cda2c425c441fc5e20c8f8893c9630e3aaa (patch) | |
tree | 0b33a8285fbbd1af576cb28f80fae702cde71fe6 /src/channel.c | |
parent | ea5d6fadbbba614e51e819cb537a3d52600bfcc5 (diff) | |
download | vim-git-f66a2cda2c425c441fc5e20c8f8893c9630e3aaa.tar.gz |
patch 8.0.0959: build failure on MS-Windowsv8.0.0959
Problem: Build failure on MS-Windows.
Solution: Use ioctlsocket() instead of fcntl().
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/channel.c b/src/channel.c index fab35899a..9a14e1ed3 100644 --- a/src/channel.c +++ b/src/channel.c @@ -3542,6 +3542,7 @@ channel_handle_events(void) /* * Set "channel"/"part" to non-blocking. + * Only works for sockets and pipes. */ void channel_set_nonblock(channel_T *channel, ch_part_T part) @@ -3552,15 +3553,12 @@ channel_set_nonblock(channel_T *channel, ch_part_T part) if (fd != INVALID_FD) { #ifdef _WIN32 - if (part == PART_SOCK) - { - u_long val = 1; + u_long val = 1; - ioctlsocket(fd, FIONBIO, &val); - } - else + ioctlsocket(fd, FIONBIO, &val); +#else + fcntl(fd, F_SETFL, O_NONBLOCK); #endif - fcntl(fd, F_SETFL, O_NONBLOCK); ch_part->ch_nonblocking = TRUE; } } @@ -3706,7 +3704,6 @@ channel_send( if (last != NULL) { - ch_log(channel, "Creating new entry"); last->wq_prev = wq->wq_prev; last->wq_next = NULL; if (wq->wq_prev == NULL) |