From 80c0bd5d7d860da2f8951d8cfcd47a2adc03fb0c Mon Sep 17 00:00:00 2001 From: Andrew Bennett Date: Wed, 29 Jun 2016 15:28:07 -0600 Subject: [PATCH] Don't redefine le64toh on modern FreeBSD, NetBSD, and DragonflyBSD. --- src/include/portable_endian.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/portable_endian.h b/src/include/portable_endian.h index 24da917..5cbfca7 100644 --- a/src/include/portable_endian.h +++ b/src/include/portable_endian.h @@ -13,7 +13,9 @@ # define le64toh(x) OSSwapLittleToHostInt64(x) #elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) # include -# define le64toh(x) letoh64(x) +# ifndef le64toh +# define le64toh(x) letoh64(x) +# endif #elif defined(__sun) && defined(__SVR4) # include # define htole64(x) LE_64(x)