]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: use _putenv() for setting environment on windows
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 18 May 2016 20:20:47 +0000 (22:20 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 18 May 2016 20:20:47 +0000 (22:20 +0200)
tests/keylog-env.c

index 4556c58491984bf53e8d263677cdd416b53e2959..2e2c7ea62c1a50373f1566bb4aac25e71a6147ef 100644 (file)
@@ -99,7 +99,15 @@ void doit(void)
                exit(1);
        }
 
+#ifdef _WIN32
+       {
+               char buf[512];
+               snprintf(buf, sizeof(buf), "GNUTLS_KEYLOGFILE=%s", filename);
+               _putenv(buf);
+       }
+#else
        setenv("GNUTLS_KEYLOGFILE", filename, 1);
+#endif
        test_cli_serv(x509_cred, "NORMAL", &ca3_cert, "localhost");
 
        if (access(filename, R_OK) != 0) {