Skip to content

Commit

Permalink
Fix Windows set_sock_nonblock()
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Feb 10, 2014
1 parent b5df97e commit 8c20e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openconnect-internal.h
Expand Up @@ -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);
#else
return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
Expand Down

0 comments on commit 8c20e63

Please sign in to comment.