From 6620e614aca1dd8303bbd5605a5bee000d93d00a Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 5 Nov 2012 22:11:22 +0100 Subject: [PATCH] windows: un-break the build It was broken in 1d85815. --- test/test-spawn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test-spawn.c b/test/test-spawn.c index d18464d8..9418e191 100644 --- a/test/test-spawn.c +++ b/test/test-spawn.c @@ -402,7 +402,13 @@ TEST_IMPL(spawn_preserve_env) { options.stdio[1].data.stream = (uv_stream_t*) &out; options.stdio_count = 2; - ASSERT(setenv("ENV_TEST", "testval", 1) == 0); +#ifdef _WIN32 + r = putenv("ENV_TEST=testval"); +#else + r = setenv("ENV_TEST", "testval", 1); +#endif + ASSERT(r == 0); + /* Explicitly set options.env to NULL to test for env clobbering. */ options.env = NULL;