diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-11 13:21:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-09-11 13:21:20 -0400 |
commit | f8a665c87d21b3bf4325c0c7f369b4ec3fbedd98 (patch) | |
tree | 3c4f3d4d6efe5e0843fac87f6e475f615300e902 /src/test | |
parent | 99cb9696ac617a42a78d9ebfa3f169fd8e4a3d88 (diff) | |
parent | 5833861f62d2667eeda1ed0f6595763aa00250b0 (diff) | |
download | tor-f8a665c87d21b3bf4325c0c7f369b4ec3fbedd98.tar.gz tor-f8a665c87d21b3bf4325c0c7f369b4ec3fbedd98.zip |
Merge remote-tracking branch 'origin/maint-0.2.3'
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 64976f3390..7ef4d1f78c 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -18,6 +18,19 @@ #include <tchar.h> #endif +/* 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) { |