浏览代码

Include Socket.h earlier in kNet to potentially fix Winsock.h / Winsock2.h conflict.

Lasse Öörni 11 年之前
父节点
当前提交
2d3f9bf141
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      Source/ThirdParty/kNet/include/kNet/MessageConnection.h

+ 5 - 2
Source/ThirdParty/kNet/include/kNet/MessageConnection.h

@@ -16,17 +16,20 @@
 /** @file MessageConnection.h
 /** @file MessageConnection.h
 	@brief The MessageConnection and ConnectionStatistics classes. */
 	@brief The MessageConnection and ConnectionStatistics classes. */
 
 
+// Modified by Lasse Oorni for Urho3D
+
 #include <vector>
 #include <vector>
 #include <map>
 #include <map>
 #include <utility>
 #include <utility>
 #include <set>
 #include <set>
 
 
 #include "kNetBuildConfig.h"
 #include "kNetBuildConfig.h"
+// Urho3D: include Socket.h first to make sure Windows.h / Winsock.h is not pulled in before Winsock2.h
+#include "Socket.h"
 #include "WaitFreeQueue.h"
 #include "WaitFreeQueue.h"
-#include "NetworkSimulator.h"
 #include "LockFreePoolAllocator.h"
 #include "LockFreePoolAllocator.h"
 #include "Lockable.h"
 #include "Lockable.h"
-#include "Socket.h"
+#include "NetworkSimulator.h"
 #include "IMessageHandler.h"
 #include "IMessageHandler.h"
 #include "BasicSerializedDataTypes.h"
 #include "BasicSerializedDataTypes.h"
 #include "Datagram.h"
 #include "Datagram.h"