aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_util.c13
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)
{