From dd8b0e7471bb85d26cc63da2f0819ceeff30550f Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 7 Apr 2015 13:58:25 +0300 Subject: [PATCH] Include winsock2.h first It wants to get included before windows.h --- source/net/datagramsocket.cpp | 3 +++ source/net/socket.cpp | 4 +++- source/net/streamserversocket.cpp | 3 +++ source/net/streamsocket.cpp | 4 +++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/source/net/datagramsocket.cpp b/source/net/datagramsocket.cpp index d24ca4e..664c265 100644 --- a/source/net/datagramsocket.cpp +++ b/source/net/datagramsocket.cpp @@ -1,3 +1,6 @@ +#ifdef WIN32 +#include +#endif #include #include #include diff --git a/source/net/socket.cpp b/source/net/socket.cpp index 99a2bc4..7c16217 100644 --- a/source/net/socket.cpp +++ b/source/net/socket.cpp @@ -1,4 +1,6 @@ -#ifndef WIN32 +#ifdef WIN32 +#include +#else #include #include #include diff --git a/source/net/streamserversocket.cpp b/source/net/streamserversocket.cpp index bbf91bc..8039ec9 100644 --- a/source/net/streamserversocket.cpp +++ b/source/net/streamserversocket.cpp @@ -1,3 +1,6 @@ +#ifdef WIN32 +#include +#endif #include #include #include diff --git a/source/net/streamsocket.cpp b/source/net/streamsocket.cpp index 3da0cc3..1dab2e3 100644 --- a/source/net/streamsocket.cpp +++ b/source/net/streamsocket.cpp @@ -1,4 +1,6 @@ -#ifndef WIN32 +#ifdef WIN32 +#include +#else #include #endif #include -- 2.43.0