Bug 844630 - Be explicit about environ visibility. r=bgirard
authorMilan Sreckovic <msreckovic@mozilla.com>
Tue, 26 Feb 2013 13:21:06 -0500
changeset 123066 036f8a67636cc709aa2dccaab8495316bdc6f433
parent 123065 a38bbae7a53bff6941854e41ea59b9b87bde8cee
child 123067 a1d01526d34421e59928bd4e9babd3e5bdb46a25
push id24372
push useremorley@mozilla.com
push dateWed, 27 Feb 2013 13:22:59 +0000
treeherdermozilla-central@0a91da5f5eab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgirard
bugs844630
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 844630 - Be explicit about environ visibility. r=bgirard
testing/gtest/gtest/src/gtest-death-test.cc
--- a/testing/gtest/gtest/src/gtest-death-test.cc
+++ b/testing/gtest/gtest/src/gtest-death-test.cc
@@ -885,17 +885,17 @@ inline char** GetEnviron() {
   // When Google Test is built as a framework on MacOS X, the environ variable
   // is unavailable. Apple's documentation (man environ) recommends using
   // _NSGetEnviron() instead.
   return *_NSGetEnviron();
 }
 #  else
 // Some POSIX platforms expect you to declare environ. extern "C" makes
 // it reside in the global namespace.
-extern "C" char** environ;
+extern "C" __attribute__ ((visibility ("default"))) char** environ;
 inline char** GetEnviron() { return environ; }
 #  endif  // GTEST_OS_MAC
 
 // The main function for a threadsafe-style death test child process.
 // This function is called in a clone()-ed process and thus must avoid
 // any potentially unsafe operations like malloc or libc functions.
 static int ExecDeathTestChildMain(void* child_arg) {
   ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);