* putenv wants a non-const char *

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22006 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2007-12-08 00:17:36 +00:00
parent e19ad69e81
commit 51264f1372

View File

@ -68,7 +68,7 @@ bool setEnv(string const & name, string const & value)
#elif defined (HAVE_PUTENV)
static std::map<string, string> varmap;
varmap[name] = name + '=' + encoded;
return ::putenv(varmap[name].c_str()) == 0;
return ::putenv(const_cast<char*>(varmap[name].c_str())) == 0;
#else
#error No environment-setting function has been defined.
#endif