From: Nabil Ghodbane Date: Wed, 8 Mar 2023 09:36:33 +0000 (+0100) Subject: spns #33658 - fix compilation issue on Windows X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f161bd33887041b219d01b4f73dde61b68d213d8;p=modules%2Fsmesh.git spns #33658 - fix compilation issue on Windows --- diff --git a/src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx b/src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx index e9f05dded..4d2a83cbb 100644 --- a/src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx +++ b/src/SMESHUtils/SMESH_MGLicenseKeyGen.cxx @@ -666,7 +666,11 @@ namespace SMESHUtils_MGLicenseKeyGen // API implementation { int ok; std::string key = GetKey(error); +#ifndef WIN32 ok = setenv(SPATIAL_LICENSE, key.c_str(), 0); // 0 means do not overwrite +#else + ok = Kernel_Utils::setenv(SPATIAL_LICENSE, key.c_str(), 0 ); +#endif MESSAGE("Set SPATIAL_LICENSE"); return (ok==0); }