From: Vadim Zeitlin Date: Tue, 4 Dec 2001 14:14:32 +0000 (+0000) Subject: compilation fix for HAVE_SETENV X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d90b2df89d55a674dcf02ee2dd56c69e0ce1dce8 compilation fix for HAVE_SETENV git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index ffbde3589f..8247bb6f9f 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -1063,8 +1063,10 @@ bool wxGetEnv(const wxString& var, wxString *value) bool wxSetEnv(const wxString& variable, const wxChar *value) { #if defined(HAVE_SETENV) - return setenv(variable.mb_str(), value ? wxString(value).mb_str().data() - : NULL, 1 /* overwrite */) == 0; + return setenv(variable.mb_str(), + value ? (const char *)wxString(value).mb_str() + : NULL, + 1 /* overwrite */) == 0; #elif defined(HAVE_PUTENV) wxString s = variable; if ( value )