Commit 8c20e637 authored by David Woodhouse's avatar David Woodhouse

Fix Windows set_sock_nonblock()

Signed-off-by: default avatarDavid Woodhouse <>
parent b5df97e7
......@@ -369,7 +369,7 @@ int openconnect__inet_aton(const char *cp, struct in_addr *addr);
static inline int set_sock_nonblock(int fd)
#ifdef _WIN32
unsigned long mode = 0;
unsigned long mode = 1;
return ioctlsocket(fd, FIONBIO, &mode);
return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment