OLD | NEW |
(Empty) | |
| 1 diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c |
| 2 --- a/src/ext/csiphash.c |
| 3 +++ b/src/ext/csiphash.c |
| 4 @@ -56,7 +56,13 @@ |
| 5 # if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) |
| 6 # include <sys/endian.h> |
| 7 # else |
| 8 -# include <endian.h> |
| 9 +# ifdef _NEWLIB_VERSION // if TOOLCHAIN=newlib |
| 10 + // newlib endian.h doesn't contain le64toh() |
| 11 + // nacl is little endian thus le64toh is a nop |
| 12 +# define le64toh(x) (x) |
| 13 +# else // the usual |
| 14 +# include <endian.h> |
| 15 +# endif |
| 16 # endif |
| 17 # if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \ |
| 18 __BYTE_ORDER == __LITTLE_ENDIAN |
OLD | NEW |