diff options
author | Brian McMichael <brian@brianmcmichael.com> | 2017-07-21 17:20:14 -0400 |
---|---|---|
committer | Brian McMichael <brian@brianmcmichael.com> | 2017-07-21 17:20:14 -0400 |
commit | 0be03c71bd91db25f30bcf4d45facf1e26dcfd30 (patch) | |
tree | 4a93dd9c4c6f107d4002c57d98a18327f5bb4cb3 | |
parent | 6adc3a37324caa07015368bfe8529e1964366eef (diff) | |
download | bitcoin-0be03c71bd91db25f30bcf4d45facf1e26dcfd30.tar.xz |
Qt: Use _putenv_s instead of setenv on Windows builds
-rw-r--r-- | src/qt/test/test_main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index cae18f41a5..1b28a285f1 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -59,7 +59,11 @@ int main(int argc, char *argv[]) // Prefer the "minimal" platform for the test instead of the normal default // platform ("xcb", "windows", or "cocoa") so tests can't unintentially // interfere with any background GUIs and don't require extra resources. - setenv("QT_QPA_PLATFORM", "minimal", 0); + #if defined(WIN32) + _putenv_s("QT_QPA_PLATFORM", "minimal"); + #else + setenv("QT_QPA_PLATFORM", "minimal", 0); + #endif // Don't remove this, it's needed to access // QApplication:: and QCoreApplication:: in the tests |