[Cryptech-Commits] [sw/libhal] branch master updated: Un-break builds on MacOS.
git at cryptech.is
git at cryptech.is
Sat Aug 11 16:38:45 UTC 2018
This is an automated email from the git hooks/post-receive script.
sra at hactrn.net pushed a commit to branch master
in repository sw/libhal.
The following commit(s) were added to refs/heads/master by this push:
new 91658ab Un-break builds on MacOS.
91658ab is described below
commit 91658ababd0f3d902c3c40673640b6a8f90c648c
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Sat Aug 11 12:35:15 2018 -0400
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.
---
tests/test-rpc_hashsig.c | 3 +++
1 file changed, 3 insertions(+)
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;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Commits
mailing list