From 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 11 Sep 2012 10:41:59 -0400 Subject: Fix assertion failure in tor_timegm. Fixes bug 6811. --- src/test/test_util.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/test') 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) { -- cgit v1.2.3