Bug 631513 - ots fails to compile on mingw r=jfkthame a=joe
authorJacek Caban <jacek@codeweavers.com>
Sun, 20 Feb 2011 11:08:41 +0000
changeset 62881 28bf1def92065e9a6412a14b02eb08cfa9859656
parent 62880 aa28638dc457230f400f90a452eba32977a815e4
child 62882 3017b3459639e52e488b66b3cde4bc2570b37e33
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersjfkthame, joe
bugs631513
milestone2.0b12pre
Bug 631513 - ots fails to compile on mingw r=jfkthame a=joe
gfx/ots/include/opentype-sanitiser.h
--- a/gfx/ots/include/opentype-sanitiser.h
+++ b/gfx/ots/include/opentype-sanitiser.h
@@ -9,22 +9,26 @@
 typedef signed char int8_t;
 typedef unsigned char uint8_t;
 typedef short int16_t;
 typedef unsigned short uint16_t;
 typedef int int32_t;
 typedef unsigned int uint32_t;
 typedef __int64 int64_t;
 typedef unsigned __int64 uint64_t;
-#include <Winsock2.h>  // for htons/ntohs
+#else
+#include <stdint.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>  // for htons/ntohs
 #undef min
 #undef max
 #else
 #include <arpa/inet.h>
-#include <stdint.h>
 #endif
 
 #include <algorithm>  // for std::min
 #include <cassert>
 #include <cstring>
 
 namespace ots {