diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-06-16 13:57:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-06-16 13:57:16 -0400 |
commit | dd73787190ebe9821f8c3574fc1c08d54314699e (patch) | |
tree | a54f6e8c4c094b331d575585eaee1950a89aa513 /src | |
parent | 6ceb37971ef863af8971ee69c1717ca8dbcda00b (diff) | |
download | tor-dd73787190ebe9821f8c3574fc1c08d54314699e.tar.gz tor-dd73787190ebe9821f8c3574fc1c08d54314699e.zip |
On Windows, tv_sec is long, not time_t.
I'm not angry, Windows: just very disappointed.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 6090dbdd18..55aff31046 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -293,7 +293,12 @@ test_util_time(void *arg) tt_int_op(-1005000L,OP_EQ, tv_udiff(&start, &end)); tt_int_op(-1005L,OP_EQ, tv_mdiff(&start, &end)); +#ifdef _WIN32 + /* Would you believe that tv_sec is a long on windows? Of course you would.*/ + end.tv_sec = LONG_MAX; +#else end.tv_sec = TIME_MAX; +#endif tt_int_op(LONG_MAX, OP_EQ, tv_udiff(&start, &end)); tt_int_op(LONG_MAX, OP_EQ, tv_mdiff(&start, &end)); |