From 7e34121e390218238bb622d3e3ccd9ccfbd152dd Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Sat, 8 Nov 2014 19:30:05 -0800 Subject: Move winsock2.h in front of a potential windows.h include. Files that included FileMap.h (possibly transitively), before including ByteOrder.h (which pulls in winsock2.h directly), will experience a compiler warning/error from the latest mingw headers. This happens because the headers require that winsock2.h come before windows.h in all cases. The simplest (and most error-proof) fix for now is to include winsock2.h before this use of windows.h. Change-Id: I33069e4c9962d9820d0ea5976554f89d7ff6307c --- include/utils/FileMap.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/utils') diff --git a/include/utils/FileMap.h b/include/utils/FileMap.h index dfe6d51..02cb7df 100644 --- a/include/utils/FileMap.h +++ b/include/utils/FileMap.h @@ -25,6 +25,10 @@ #include #ifdef HAVE_WIN32_FILEMAP +// Ensure that we always pull in winsock2.h before windows.h +#ifdef HAVE_WINSOCK +#include +#endif #include #endif -- cgit v1.1