Browse Source

More kNet include order fixes.

Lasse Öörni 11 years ago
parent
commit
e6ab7f5ccc

+ 1 - 1
Source/ThirdParty/kNet/include/kNet/MessageConnection.h

@@ -24,7 +24,7 @@
 #include <set>
 
 #include "kNetBuildConfig.h"
-// Urho3D: include Socket.h first to make sure Windows.h / Winsock.h is not pulled in before Winsock2.h
+// Urho3D: include Socket.h first to make sure WS2Include.h is included before windows.h / winsock.h
 #include "Socket.h"
 #include "WaitFreeQueue.h"
 #include "LockFreePoolAllocator.h"

+ 3 - 2
Source/ThirdParty/kNet/include/kNet/Thread.h

@@ -24,6 +24,9 @@
 #include <boost/thread.hpp>
 #else
 
+// Urho3D: include Event.h first to make sure WS2Include.h is included before windows.h / winsock.h
+#include "Event.h"
+
 #ifdef WIN32
 // Urho3D: windows.h in lowercase to fix MinGW cross-compiling on a case-sensitive system
 #include <windows.h>
@@ -31,8 +34,6 @@
 #include <pthread.h>
 #endif
 
-#include "Event.h"
-
 namespace kNet
 {
 typedef void (*ThreadEntryFunc)(void *threadStartData);

+ 3 - 1
Source/ThirdParty/kNet/src/NetworkSimulator.cpp

@@ -12,7 +12,9 @@
    See the License for the specific language governing permissions and
    limitations under the License. */
 
-#include "kNet/NetworkSimulator.h"
+// Modified by Lasse Oorni for Urho3D
+
+// Urho3D: MessageConnection.h already includes NetworkSimulator.h, make sure WS2Include.h is included before windows.h / winsock.h
 #include "kNet/MessageConnection.h"
 
 namespace kNet