[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Appropriately condition the _le64toh macro definition for OpenBSD.
commit 8999150f71e401bfd9eed4a10f905f0f60073c38
Author: dana koch <dsk@xxxxxxxxxx>
Date: Sun Feb 16 16:12:50 2014 +1100
Appropriately condition the _le64toh macro definition for OpenBSD.
This corrects a linker error on OpenBSD, where the function is called letoh64. See also http://git.kernel.org/cgit/docs/man-pages/man-pages.git/tree/man3/endian.3#n84.
---
src/ext/csiphash.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index 30be40b..4f58c4a 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -58,7 +58,11 @@
__BYTE_ORDER == __LITTLE_ENDIAN
# define _le64toh(x) ((uint64_t)(x))
# else
-# define _le64toh(x) le64toh(x)
+# if defined(__OpenBSD__)
+# define _le64toh(x) letoh64(x)
+# else
+# define _le64toh(x) le64toh(x)
+# endif
# endif
#endif
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits