FreeBSD needs <sys/endian.h> instead of <endian.h>.
pthread_np.h \
pwd.h \
regex.h \
pthread_np.h \
pwd.h \
regex.h \
sys/fs_types.h \
sys/fstyp.h \
sys/ioctl.h \
sys/fs_types.h \
sys/fstyp.h \
sys/ioctl.h \
#include <math.h>
#include <pthread.h>
#include <math.h>
#include <pthread.h>
+/* for be{16,64}toh */
+#if HAVE_ENDIAN_H
+#include <endian.h>
+#elif HAVE_SYS_ENDIAN_H
+#include <sys/endian.h>
+#endif
+
#define GCRYPT_NO_DEPRECATED
#include <gcrypt.h>
#define GCRYPT_NO_DEPRECATED
#include <gcrypt.h>