Add _putenv() in case of WIN32 port instead of setenv()

This commit is contained in:
Ervin Hegedus 2024-08-05 14:30:26 +02:00
parent 82801752d4
commit 6cffa8f904
No known key found for this signature in database
GPG Key ID: 5FA5BC3F5EC41F61

View File

@ -482,7 +482,12 @@ int main(int argc, char **argv) {
std::string ver(MODSECURITY_VERSION);
std::string envvar("ModSecurity " + ver + " regression tests");
#ifndef WIN32
setenv("MODSECURITY", envvar.c_str(), 1);
#else
_putenv_s("MODSECURITY", envvar.c_str());
#endif
#ifndef NO_LOGS
int test_number = 0;
#endif