diff options
author | Rob Austein <sra@hactrn.net> | 2018-08-11 12:35:15 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2018-08-11 12:35:15 -0400 |
commit | 91658ababd0f3d902c3c40673640b6a8f90c648c (patch) | |
tree | 55d0d5245fcde475be8495a5176840008be2433b | |
parent | a0940d97b4aa3d45c77fbec95092829ca90b1eaf (diff) |
Un-break builds on MacOS.
timersub() is a macro on *BSD, including MacOS, so redefinition as a
function in hashsig test code was breaking the whole build.
Clang has other comments on the hashsig code, leaving those for Paul.
-rw-r--r-- | tests/test-rpc_hashsig.c | 3 |
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; |