]> git.lyx.org Git - features.git/commitdiff
Putenv requires a char *, for some reason.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 28 Mar 2013 13:02:21 +0000 (14:02 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 28 Mar 2013 13:03:43 +0000 (14:03 +0100)
src/support/environment.cpp

index dfdc2d4867c804d63ff1b4fa2dc65b9bc680ac18..a3539220d9457832b2b117cc21b48014ed307112 100644 (file)
@@ -129,10 +129,10 @@ bool unsetEnv(string const & name)
 {
 #if defined(HAVE_UNSETENV)
        // FIXME: does it leak?
-       return unsetenv(name.c_str()) == 0;
+       return ::unsetenv(name.c_str()) == 0;
 #elif defined(HAVE_PUTENV)
        // This is OK with MSVC and MinGW at least.
-       return putenv((name + "=").c_str()) == 0;
+       return ::putenv(const_cast<char*>((name + "=").c_str())) == 0;
 #else
 #error No environment-unsetting function has been defined.
 #endif