From 5cab4f8b357ca242e40981918524421bb371b345 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Tue, 9 Jun 2015 11:40:54 +0100 Subject: [PATCH] Fix includes for Windows wxWidgets 3.0 build wxWidgets 3.0 and w32pthreads both define mode_t on Windows, causing a redefinition error. The w32pthreads mode_t doesn't get used, so I've chosen the wxWidgets definition. Also add (required by min and max) which is no longer implicitly included on Windows, and wx/crt.h, required by wxVsnprintf in wxWidgets 3.0 --- common/include/Utilities/Dependencies.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/include/Utilities/Dependencies.h b/common/include/Utilities/Dependencies.h index c559d15efd..33c18106da 100644 --- a/common/include/Utilities/Dependencies.h +++ b/common/include/Utilities/Dependencies.h @@ -183,12 +183,22 @@ public: #include #include +#if defined(_WIN32) && wxMAJOR_VERSION >= 3 +#include +// This deals with a mode_t redefinition conflict. The mode_t doesn't seem to be +// used anywhere in w32pthreads, so I've chosen to use the wxWidgets mode_t +// (I think it's unsigned int vs signed int) +#include +#define HAVE_MODE_T +#endif + #include #include // string.h under c++ #include // stdio.h under c++ #include #include #include +#include #include "Pcsx2Defs.h"