summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index b21aa6970..ce265ee15 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -707,7 +707,11 @@ void Client::setEnv(const char *const name, const char *const value)
{
if (!name || !value)
return;
+#ifdef WIN32
+ if (putenv((char*)(std::string(name) + "=" + value).c_str()))
+#else
if (setenv(name, value, 1))
+#endif
logger->log("setenv failed: %s=%s", name, value);
}