Skip to content

Commit f66a2cd

Browse files
committed
patch 8.0.0959: build failure on MS-Windows
Problem: Build failure on MS-Windows. Solution: Use ioctlsocket() instead of fcntl().
1 parent ea5d6fa commit f66a2cd

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/channel.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3542,6 +3542,7 @@ channel_handle_events(void)
35423542

35433543
/*
35443544
* Set "channel"/"part" to non-blocking.
3545+
* Only works for sockets and pipes.
35453546
*/
35463547
void
35473548
channel_set_nonblock(channel_T *channel, ch_part_T part)
@@ -3552,15 +3553,12 @@ channel_set_nonblock(channel_T *channel, ch_part_T part)
35523553
if (fd != INVALID_FD)
35533554
{
35543555
#ifdef _WIN32
3555-
if (part == PART_SOCK)
3556-
{
3557-
u_long val = 1;
3556+
u_long val = 1;
35583557

3559-
ioctlsocket(fd, FIONBIO, &val);
3560-
}
3561-
else
3558+
ioctlsocket(fd, FIONBIO, &val);
3559+
#else
3560+
fcntl(fd, F_SETFL, O_NONBLOCK);
35623561
#endif
3563-
fcntl(fd, F_SETFL, O_NONBLOCK);
35643562
ch_part->ch_nonblocking = TRUE;
35653563
}
35663564
}
@@ -3706,7 +3704,6 @@ channel_send(
37063704

37073705
if (last != NULL)
37083706
{
3709-
ch_log(channel, "Creating new entry");
37103707
last->wq_prev = wq->wq_prev;
37113708
last->wq_next = NULL;
37123709
if (wq->wq_prev == NULL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
959,
772774
/**/
773775
958,
774776
/**/

0 commit comments

Comments
 (0)