control_socket: suppress Windows warning

winsock2.h (include from utils/net.h) should be included prior to
windows.h, otherwise windows.h includes winsock.h (version 1), that
is incompatible. WIN32_LEAN_AND_MEAN causes some headers not being
included with windows.h (including winsock.h).
This commit is contained in:
Martin Pulec
2025-06-20 14:14:40 +02:00
parent 1d4dc17051
commit 29063abc6d

View File

@@ -45,6 +45,7 @@
#include <cstdlib> // for atoi, free, malloc, abort, strtoll
#include <cstring> // for strlen, NULL, strncpy, strchr, strcmp
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#include <fcntl.h> // for fcntl, F_SETFL, O_NONBLOCK