]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Appropriately condition the _le64toh macro definition for OpenBSD.
authordana koch <dsk@google.com>
Sun, 16 Feb 2014 05:12:50 +0000 (16:12 +1100)
committerNick Mathewson <nickm@torproject.org>
Mon, 17 Feb 2014 22:42:19 +0000 (22:42 +0000)
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

index 30be40b518edc5757a8c2557e286435b5eae97c9..4f58c4a141bc68346dd81a5cfb214f70d1ab8396 100644 (file)
        __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