util: use putenv instead of setenv for mingw

This commit is contained in:
moneromooo-monero 2015-11-25 21:37:05 +00:00
parent 263cc48c48
commit 0921f5b4d7
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 5 additions and 0 deletions

View File

@ -402,8 +402,13 @@ std::string get_nix_version_display_string()
}
catch (...)
{
#if defined(__MINGW32__) || defined(__MINGW__)
putenv("LC_ALL=C");
putenv("LANG=C");
#else
setenv("LC_ALL", "C", 1);
setenv("LANG", "C", 1);
#endif
return true;
}
return false;