diff options
author | dana koch <dsk@google.com> | 2014-02-16 16:12:50 +1100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-02-17 22:42:19 +0000 |
commit | 8999150f71e401bfd9eed4a10f905f0f60073c38 (patch) | |
tree | 9cf3e7a0670316eaad8872ff77c09362d1c9880b /src/ext | |
parent | e1deb01e5f1a666486690f9e511b3a0af66ed683 (diff) | |
download | tor-8999150f71e401bfd9eed4a10f905f0f60073c38.tar tor-8999150f71e401bfd9eed4a10f905f0f60073c38.tar.gz |
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.
Diffstat (limited to 'src/ext')
-rw-r--r-- | src/ext/csiphash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c index 30be40b51..4f58c4a14 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 |