aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build/nix-build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-10-06 13:36:55 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-10-06 13:49:20 +0200
commit85c8be6286e8f5464813a8a29b0b78d892498745 (patch)
treee270b31fa13afd6e87e610f41fcffe039d4381bd /src/nix-build/nix-build.cc
parent0419cd26954d9d7c5b5ace96501b41cc81d66eed (diff)
Remove static variable name clashes
This was useful for an experiment with building Nix as a single compilation unit. It's not very useful otherwise but also doesn't hurt...
Diffstat (limited to 'src/nix-build/nix-build.cc')
-rwxr-xr-xsrc/nix-build/nix-build.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index 3a8d67f21..a79b1086b 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -67,7 +67,7 @@ std::vector<string> shellwords(const string & s)
return res;
}
-static void _main(int argc, char * * argv)
+static void main_nix_build(int argc, char * * argv)
{
auto dryRun = false;
auto runEnv = std::regex_search(argv[0], std::regex("nix-shell$"));
@@ -540,5 +540,5 @@ static void _main(int argc, char * * argv)
}
}
-static RegisterLegacyCommand s1("nix-build", _main);
-static RegisterLegacyCommand s2("nix-shell", _main);
+static RegisterLegacyCommand r_nix_build("nix-build", main_nix_build);
+static RegisterLegacyCommand r_nix_shell("nix-shell", main_nix_build);