aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/portability.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/portability.h b/lib/portability.h
index 48cb490a..a049e7a6 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -125,6 +125,16 @@ char *strcasestr(const char *haystack, const char *needle);
int clearenv(void);
+#elif defined(__FreeBSD__)
+
+#include <sys/endian.h>
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define IS_BIG_ENDIAN 1
+#else
+#define IS_BIG_ENDIAN 0
+#endif
+
#else
#include <byteswap.h>
@@ -166,7 +176,7 @@ int clearenv(void);
#ifdef __APPLE__
#include <util.h>
-#else
+#elif !defined(__FreeBSD__)
#include <pty.h>
#endif