]> git.tdb.fi Git - libs/net.git/commitdiff
Include winsock2.h first
authorMikko Rasa <tdb@tdb.fi>
Tue, 7 Apr 2015 10:58:25 +0000 (13:58 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 7 Apr 2015 10:58:25 +0000 (13:58 +0300)
It wants to get included before windows.h

source/net/datagramsocket.cpp
source/net/socket.cpp
source/net/streamserversocket.cpp
source/net/streamsocket.cpp

index d24ca4e1ec8ec1c10fcd11c3188da874426b053b..664c2659de69ec43eaf9a0a0097d77522e84f58a 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef WIN32
+#include <winsock2.h>
+#endif
 #include <cerrno>
 #include <msp/core/systemerror.h>
 #include <msp/io/handle_private.h>
index 99a2bc41e01f3ab030204c2db9c079f0b576cb89..7c162178eb1a822c43d9167d741bba67131674f0 100644 (file)
@@ -1,4 +1,6 @@
-#ifndef WIN32
+#ifdef WIN32
+#include <winsock2.h>
+#else
 #include <cerrno>
 #include <unistd.h>
 #include <fcntl.h>
index bbf91bccd9b9798f311151c198b8b8ccd42e3a4c..8039ec986155155196eb4360c62197468ddc7914 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef WIN32
+#include <winsock2.h>
+#endif
 #include <cerrno>
 #include <msp/core/refptr.h>
 #include <msp/core/systemerror.h>
index 3da0cc312ff640511f4a525c06ed7d6808f24888..1dab2e3aba39ebbcc77bbb5b7927ddcc7f7b654a 100644 (file)
@@ -1,4 +1,6 @@
-#ifndef WIN32
+#ifdef WIN32
+#include <winsock2.h>
+#else
 #include <sys/socket.h>
 #endif
 #include <cerrno>