$OpenBSD$ From upstream 5c907386384666f1afc78d847b7bf88e86a49e1d. --- Source/Core/Common/StringUtil.cpp.orig Wed Jul 13 22:49:32 2016 +++ Source/Core/Common/StringUtil.cpp Wed Jul 13 22:49:44 2016 @@ -28,7 +28,7 @@ #include #endif -#if !defined(_WIN32) && !defined(ANDROID) +#if !defined(_WIN32) && !defined(ANDROID) && !defined(__OpenBSD__) static locale_t GetCLocale() { static locale_t c_locale = newlocale(LC_ALL_MASK, "C", nullptr); @@ -121,11 +121,11 @@ bool CharArrayFromFormatV(char* out, int outsize, cons c_locale = _create_locale(LC_ALL, "C"); writtenCount = _vsnprintf_l(out, outsize, format, c_locale, args); #else - #if !defined(ANDROID) + #if !defined(ANDROID) && !defined(__OpenBSD__) locale_t previousLocale = uselocale(GetCLocale()); #endif writtenCount = vsnprintf(out, outsize, format, args); - #if !defined(ANDROID) + #if !defined(ANDROID) && !defined(__OpenBSD__) uselocale(previousLocale); #endif #endif @@ -162,12 +162,12 @@ std::string StringFromFormatV(const char* format, va_l std::string temp = buf; delete[] buf; #else - #if !defined(ANDROID) + #if !defined(ANDROID) && !defined(__OpenBSD__) locale_t previousLocale = uselocale(GetCLocale()); #endif if (vasprintf(&buf, format, args) < 0) ERROR_LOG(COMMON, "Unable to allocate memory for string"); - #if !defined(ANDROID) + #if !defined(ANDROID) && !defined(__OpenBSD__) uselocale(previousLocale); #endif