From e9970a34e8841faaecd39ba18e0913101beca592 Mon Sep 17 00:00:00 2001 From: p01arst0rm Date: Wed, 17 Jun 2020 03:19:15 +0100 Subject: [PATCH] appended ' __attribute__((weak)); ' to 'extern char * * environ ' --- src/libutil/util.cc | 2 +- src/nix-build/nix-build.cc | 2 +- src/nix/command.cc | 2 +- 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 {