Skip to content

Commit

Permalink
Merge pull request #33836 from kadas-albireo/serverbuild
Browse files Browse the repository at this point in the history
Fix server mingw build
  • Loading branch information
pblottiere committed Feb 7, 2020
2 parents 578616c + 6742826 commit ddaf839
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/server/qgsserver.cpp
Expand Up @@ -290,11 +290,14 @@ bool QgsServer::init()


void QgsServer::putenv( const QString &var, const QString &val ) void QgsServer::putenv( const QString &var, const QString &val )
{ {
#ifdef _MSC_VER if ( val.isEmpty() )
_putenv_s( var.toStdString().c_str(), val.toStdString().c_str() ); {
#else qunsetenv( var.toUtf8().data() );
setenv( var.toStdString().c_str(), val.toStdString().c_str(), 1 ); }
#endif else
{
qputenv( var.toUtf8().data(), val.toUtf8() );
}
sSettings()->load( var ); sSettings()->load( var );
} }


Expand Down

0 comments on commit ddaf839

Please sign in to comment.