瀏覽代碼

Fix build issue with MSVC

windows.h is a mess.
Rémi Verschelde 8 年之前
父節點
當前提交
15c4d5006e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/unix/ip_unix.cpp

+ 2 - 1
drivers/unix/ip_unix.cpp

@@ -34,8 +34,9 @@
 
 
 #ifdef WINDOWS_ENABLED
 #ifdef WINDOWS_ENABLED
 #include <stdio.h>
 #include <stdio.h>
-#include <windows.h>
 #include <winsock2.h>
 #include <winsock2.h>
+// Needs to be included after winsocks2.h
+#include <windows.h>
 #include <ws2tcpip.h>
 #include <ws2tcpip.h>
 #ifndef UWP_ENABLED
 #ifndef UWP_ENABLED
 #if defined(__MINGW32__) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4)
 #if defined(__MINGW32__) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4)