| Index: ports/tor/nacl.patch
|
| diff --git a/ports/tor/nacl.patch b/ports/tor/nacl.patch
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cc7f8f2405654061d7870689918c38edab4c7276
|
| --- /dev/null
|
| +++ b/ports/tor/nacl.patch
|
| @@ -0,0 +1,18 @@
|
| +diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
|
| +--- a/src/ext/csiphash.c
|
| ++++ b/src/ext/csiphash.c
|
| +@@ -56,7 +56,13 @@
|
| + # if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
| + # include <sys/endian.h>
|
| + # else
|
| +-# include <endian.h>
|
| ++# ifdef _NEWLIB_VERSION // if TOOLCHAIN=newlib
|
| ++ // newlib endian.h doesn't contain le64toh()
|
| ++ // nacl is little endian thus le64toh is a nop
|
| ++# define le64toh(x) (x)
|
| ++# else // the usual
|
| ++# include <endian.h>
|
| ++# endif
|
| + # endif
|
| + # if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \
|
| + __BYTE_ORDER == __LITTLE_ENDIAN
|
|
|