diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-11 10:41:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-09-11 13:13:07 -0400 |
commit | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 (patch) | |
tree | 4f8172e13883e45ecff9295737cc82e20dac3602 /src/test | |
parent | 1c30e6abc93fa086a14d01d838066581a3657285 (diff) | |
download | tor-973c18bf0e84d14d8006a9ae97fde7f7fb97e404.tar tor-973c18bf0e84d14d8006a9ae97fde7f7fb97e404.tar.gz |
Fix assertion failure in tor_timegm.
Fixes bug 6811.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index f9a83a38a..12e3fa979 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -13,6 +13,19 @@ #include "mempool.h" #include "memarea.h" +/* XXXX this is a minimal wrapper to make the unit tests compile with the + * changed tor_timegm interface. */ +static time_t +tor_timegm_wrapper(const struct tm *tm) +{ + time_t t; + if (tor_timegm(tm, &t) < 0) + return -1; + return t; +} + +#define tor_timegm tor_timegm_wrapper + static void test_util_time(void) { |