aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-06-05 11:06:26 -0400
committerNick Mathewson <nickm@torproject.org>2012-06-05 11:06:26 -0400
commitb482c870ca3d70bc5611b8eb447ebbe3418bf3a9 (patch)
tree653f7663bbe2edd79880a0ddc3579dfb78ae5491 /src/test/test_util.c
parent2468a1bd2c3a989c4225897e58b5bf09ac08ba61 (diff)
downloadtor-b482c870ca3d70bc5611b8eb447ebbe3418bf3a9.tar.gz
tor-b482c870ca3d70bc5611b8eb447ebbe3418bf3a9.zip
Fix some mingw build warnings
These include: - Having a weird in_addr that can't be initialized with {0} - Needing INVALID_HANDLE_VALUE instead of -1 for file handles. - Having a weird dependent definition for struct stat. - pid is signed, not unsigned.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index bf33344039..4b628ea54d 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -2274,8 +2274,13 @@ run_util_spawn_background(const char *argv[], const char *expected_out,
test_assert(process_handle != NULL);
test_eq(expected_status, process_handle->status);
+#ifdef _WIN32
+ test_assert(process_handle->stdout_pipe != INVALID_HANDLE_VALUE);
+ test_assert(process_handle->stderr_pipe != INVALID_HANDLE_VALUE);
+#else
test_assert(process_handle->stdout_pipe > 0);
test_assert(process_handle->stderr_pipe > 0);
+#endif
/* Check stdout */
pos = tor_read_all_from_process_stdout(process_handle, stdout_buf,