Skip to content

Commit 6cffa8f

Browse files
committed
Add _putenv() in case of WIN32 port instead of setenv()
1 parent 8280175 commit 6cffa8f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/regression/regression.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,12 @@ int main(int argc, char **argv) {
482482
std::string ver(MODSECURITY_VERSION);
483483
std::string envvar("ModSecurity " + ver + " regression tests");
484484

485+
#ifndef WIN32
485486
setenv("MODSECURITY", envvar.c_str(), 1);
487+
#else
488+
_putenv_s("MODSECURITY", envvar.c_str());
489+
#endif
490+
486491
#ifndef NO_LOGS
487492
int test_number = 0;
488493
#endif

0 commit comments

Comments
 (0)