aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-17 10:33:42 +0200
committerGitHub <noreply@github.com>2020-06-17 10:33:42 +0200
commitea5bcfb59bdf34325d51aa70c8fcb7b399f99d09 (patch)
tree3d86cdfff7307e36c1d75a9e7451e8d1460ae529 /src
parent9ce994d45eab1f89c2e3d485d7486a10fa219479 (diff)
parente9970a34e8841faaecd39ba18e0913101beca592 (diff)
Merge pull request #3708 from p01arst0rm/extern-char-fix
appended ' __attribute__((weak)); ' to 'extern char * * environ '
Diffstat (limited to 'src')
-rw-r--r--src/libutil/util.cc2
-rwxr-xr-xsrc/nix-build/nix-build.cc2
-rw-r--r--src/nix/command.cc2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 667dd2edb..85246ced6 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -35,7 +35,7 @@
#endif
-extern char * * environ;
+extern char * * environ __attribute__((weak));
namespace nix {
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index a224d635d..f77de56ea 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -21,7 +21,7 @@
using namespace nix;
using namespace std::string_literals;
-extern char * * environ;
+extern char * * environ __attribute__((weak));
/* Recreate the effect of the perl shellwords function, breaking up a
* string into arguments like a shell word, including escapes
diff --git a/src/nix/command.cc b/src/nix/command.cc
index d62626c26..3651a9e9c 100644
--- a/src/nix/command.cc
+++ b/src/nix/command.cc
@@ -4,7 +4,7 @@
#include "nixexpr.hh"
#include "profiles.hh"
-extern char * * environ;
+extern char * * environ __attribute__((weak));
namespace nix {