aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-rpc_hashsig.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test-rpc_hashsig.c b/tests/test-rpc_hashsig.c
index 00728c3..8cd2897 100644
--- a/tests/test-rpc_hashsig.c
+++ b/tests/test-rpc_hashsig.c
@@ -53,6 +53,8 @@
#include <sys/time.h>
/* not included in my glibc, sigh... */
+/* But it's a macro on *BSD including MacOS so don't conflict with that. */
+#ifndef timersub
void timersub(struct timeval *a, struct timeval *b, struct timeval *res)
{
res->tv_sec = a->tv_sec - b->tv_sec;
@@ -66,6 +68,7 @@ void timersub(struct timeval *a, struct timeval *b, struct timeval *res)
++res->tv_sec;
}
}
+#endif
static int debug = 0;
static int info = 0;