Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix problem with newer MinGW runtimes
  • Loading branch information
sfan5 committed Apr 14, 2014
1 parent dcafad2 commit d436502
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/porting.cpp
Expand Up @@ -23,6 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
See comments in porting.h
*/

#include "porting.h"

#if defined(__APPLE__)
#include <mach-o/dyld.h>
#include "CoreFoundation/CoreFoundation.h"
Expand All @@ -37,7 +39,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <sys/utsname.h>
#endif

#include "porting.h"
#include "config.h"
#include "debug.h"
#include "filesys.h"
Expand Down
11 changes: 8 additions & 3 deletions src/porting.h
Expand Up @@ -24,6 +24,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef PORTING_HEADER
#define PORTING_HEADER

#ifdef _WIN32
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0501 // We need to do this before any other headers
// because those might include sdkddkver.h which defines _WIN32_WINNT if not already set
#endif

#include <string>
#include "irrlichttypes.h" // u32
#include "debug.h"
Expand All @@ -42,9 +50,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
//#define ALIGNOF(type) offsetof (alignment_trick<type>, member)

#ifdef _WIN32
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <windows.h>

#define sleep_ms(x) Sleep(x)
Expand Down

0 comments on commit d436502

Please sign in to comment.