Bug 1104649 - Always cast the string for putenv. r=glandium

This commit is contained in:
Kai-Zhen Li 2014-11-26 20:26:56 +08:00
parent dbf5c1d53f
commit 9401481dd6

View File

@ -169,7 +169,7 @@ __wrap_PR_SetEnv(const char *string)
if ( !strchr(string, '=')) return(-1);
pthread_mutex_lock(&_pr_envLock);
result = putenv(string);
result = putenv(const_cast<char*>(string));
pthread_mutex_unlock(&_pr_envLock);
return (result)? -1 : 0;
}