From 057f050ce33497704fabfac5e9e7650fe2d4e73e Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 30 Apr 2020 23:18:50 -0700 Subject: Fix non-Windows build break from Windows compat changes --- util.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 848fca4..4962b52 100644 --- a/util.c +++ b/util.c @@ -441,6 +441,10 @@ void fatal_error(char *format, ...) exit(1); } +#ifndef _WIN32 +#include +#endif + void warning(char *format, ...) { va_list args; @@ -722,7 +726,6 @@ int socket_error_is_wouldblock(void) #else #include -#include void socket_init(void) { @@ -730,7 +733,7 @@ void socket_init(void) int socket_blocking(int sock, int should_block) { - if (fcntl(listen_sock, F_SETFL, should_block ? 0 : O_NONBLOCK)) { + if (fcntl(sock, F_SETFL, should_block ? 0 : O_NONBLOCK)) { return errno; } return 0; -- cgit v1.2.3