diff --git a/CHANGES b/CHANGES index 06f10076d..bec3bf193 100644 --- a/CHANGES +++ b/CHANGES @@ -38,6 +38,7 @@ Misc: - Debugger: CLI debugger now exits when end-of-stream is reached - VFS: VFile.sync now updates modified time - GBA: Add overrides for DBZ: Legacy of Goku II and Ueki no Housoku + - Util: Fix intermittent build failure on OS X 0.4.0: (2016-02-02) Features: diff --git a/CMakeLists.txt b/CMakeLists.txt index c8fb9ebc0..977dace92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -242,7 +242,7 @@ if(HAVE_LOCALTIME_R) list(APPEND FUNCTION_DEFINES HAVE_LOCALTIME_R) endif() -if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE) +if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE OR APPLE) list(APPEND FUNCTION_DEFINES HAVE_LOCALE) if (HAVE_STRTOF_L) list(APPEND FUNCTION_DEFINES HAVE_STRTOF_L) diff --git a/src/util/formatting.h b/src/util/formatting.h index 43372f80c..b09c12944 100644 --- a/src/util/formatting.h +++ b/src/util/formatting.h @@ -12,9 +12,7 @@ #if defined(__APPLE__) || defined(__FreeBSD__) #include "xlocale.h" -#endif - -#ifndef HAVE_LOCALE +#elif !defined(HAVE_LOCALE) typedef const char* locale_t; #endif