From 24ec7500032c2434e450b7bc3f77ff4c1f12c41c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 26 Feb 2018 18:29:40 +0100 Subject: nix run: Fix segfault on macOS Note that clearenv() is not available on macOS. Fixes #1907. --- src/libutil/util.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 47e02bc898..c5c537ee63 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -32,6 +32,9 @@ string getEnv(const string & key, const string & def = ""); /* Get the entire environment. */ std::map getEnv(); +/* Clear the environment. */ +void clearEnv(); + /* Return an absolutized path, resolving paths relative to the specified directory, or the current directory otherwise. The path is also canonicalised. */ -- cgit 1.4.1