Changeset 257691 in webkit


Ignore:
Timestamp:
Mar 1, 2020 10:24:29 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Re-add the patch used to work around gtest linking failure on FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=208409

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2020-03-01
Reviewed by Michael Catanzaro.

The patch was added in https://bugs.webkit.org/show_bug.cgi?id=138420 to
fix gtest linking error on FreeBSD. However, it was accidentally dropped
in r235613, the commit updating gtest, causing the error to happen
again. Re-add it to fix the build on FreeBSD.

  • gtest/src/gtest-death-test.cc:
Location:
trunk/Source/ThirdParty
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ChangeLog

    r255241 r257691  
     12020-03-01  Ting-Wei Lan  <lantw44@gmail.com>
     2
     3        Re-add the patch used to work around gtest linking failure on FreeBSD
     4        https://bugs.webkit.org/show_bug.cgi?id=208409
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        The patch was added in https://bugs.webkit.org/show_bug.cgi?id=138420 to
     9        fix gtest linking error on FreeBSD. However, it was accidentally dropped
     10        in r235613, the commit updating gtest, causing the error to happen
     11        again. Re-add it to fix the build on FreeBSD.
     12
     13        * gtest/src/gtest-death-test.cc:
     14
    1152020-01-24  Sergio Villar Senin  <svillar@igalia.com>
    216
  • trunk/Source/ThirdParty/gtest/src/gtest-death-test.cc

    r235613 r257691  
    11531153};
    11541154
    1155 #  if GTEST_OS_MAC
    1156 inline char** GetEnviron() {
    1157   // When Google Test is built as a framework on MacOS X, the environ variable
    1158   // is unavailable. Apple's documentation (man environ) recommends using
    1159   // _NSGetEnviron() instead.
    1160   return *_NSGetEnviron();
    1161 }
    1162 #  else
    1163 // Some POSIX platforms expect you to declare environ. extern "C" makes
    1164 // it reside in the global namespace.
    1165 extern "C" char** environ;
    1166 inline char** GetEnviron() { return environ; }
    1167 #  endif  // GTEST_OS_MAC
    1168 
    11691155#  if !GTEST_OS_QNX
    11701156// The main function for a threadsafe-style death test child process.
     
    11921178  // invoke the test program via a valid path that contains at least
    11931179  // one path separator.
    1194   execve(args->argv[0], args->argv, GetEnviron());
    1195   DeathTestAbort(std::string("execve(") + args->argv[0] + ", ...) in " +
     1180  // We have replaced execve() with execv() for WebKit to avoid using
     1181  // environ. It should be safe because execv() is just a simple wrapper
     1182  // of execve().
     1183  execv(args->argv[0], args->argv);
     1184  DeathTestAbort(std::string("execv(") + args->argv[0] + ", ...) in " +
    11961185                 original_dir + " failed: " +
    11971186                 GetLastErrnoDescription());
Note: See TracChangeset for help on using the changeset viewer.