From 1d0a89879ceb6e27bd4933f1e2c804bdb7f43275 Mon Sep 17 00:00:00 2001 From: Deomid Ryabkov <rojer@cesanta.com> Date: Tue, 15 Mar 2016 13:23:00 +0200 Subject: [PATCH] Include Winsock2 headers Contributed by @f4bsch in https://github.com/cesanta/mongoose/pull/626 Submitting here with a minor change: MSDN says that ws2ipdef.h should not be included directly and users should include ws2tcpip.h PUBLISHED_FROM=1ebe7eac0cf87b0554432b94049b3d58bf7640f7 --- mongoose.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mongoose.h b/mongoose.h index fd1ea43e1..58724f25a 100644 --- a/mongoose.h +++ b/mongoose.h @@ -150,8 +150,12 @@ #ifdef _MSC_VER #pragma comment(lib, "ws2_32.lib") /* Linking with winsock library */ #endif + +#include <winsock2.h> +#include <ws2tcpip.h> #include <windows.h> #include <process.h> + #ifndef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS #endif -- GitLab