From: Orgad Shaneh Date: Wed, 5 Oct 2022 05:31:52 +0000 (+0300) Subject: fix: Fix implementation of unsetenv on Windows (#1171) X-Git-Tag: v4.7~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b12af302861287e16d3a7a91ad2d14c1657342bc;p=thirdparty%2Fccache.git fix: Fix implementation of unsetenv on Windows (#1171) --- diff --git a/src/Util.cpp b/src/Util.cpp index 2d9bb3b73..5dde0017c 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -1364,6 +1364,8 @@ unsetenv(const std::string& name) { #ifdef HAVE_UNSETENV ::unsetenv(name.c_str()); +#elif defined(_WIN32) + SetEnvironmentVariable(name.c_str(), NULL); #else putenv(strdup(name.c_str())); // Leak to environment. #endif