diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-06-14 11:42:14 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-06-14 11:42:14 -0400 |
commit | d0f92cdb0e7d8619ed3fcf10d62e0b2961067c00 (patch) | |
tree | 7f466a66144dbab46757d8e1cbff02e5c08bf6c3 /src | |
parent | 82dd1226e19fdb6a8fe0c2c2024e65b18b1c336e (diff) | |
download | mongo-d0f92cdb0e7d8619ed3fcf10d62e0b2961067c00.tar.gz |
SERVER-41623 Fix building on newer windows Toolkits.
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/base/environment_buffer.cpp | 10 | ||||
-rw-r--r-- | src/mongo/shell/shell_utils_launcher.cpp | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/mongo/base/environment_buffer.cpp b/src/mongo/base/environment_buffer.cpp index 71186931374..d2396155198 100644 --- a/src/mongo/base/environment_buffer.cpp +++ b/src/mongo/base/environment_buffer.cpp @@ -31,10 +31,16 @@ #ifndef _WIN32 extern char** environ; +namespace { +char** environmentPointer = environ; +} #else -char** const environ = nullptr; +namespace { +char** environmentPointer = nullptr; +} + #endif char** mongo::getEnvironPointer() { - return environ; + return environmentPointer; } diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp index 5a738a4e213..51b266dc9ed 100644 --- a/src/mongo/shell/shell_utils_launcher.cpp +++ b/src/mongo/shell/shell_utils_launcher.cpp @@ -76,10 +76,6 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" -#ifndef _WIN32 -extern char** environ; -#endif - namespace mongo { using std::cout; |