about summary refs log tree commit diff
path: root/src/base/detect.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/detect.h')
-rw-r--r--src/base/detect.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/base/detect.h b/src/base/detect.h
index 631105e8..f802b119 100644
--- a/src/base/detect.h
+++ b/src/base/detect.h
@@ -77,8 +77,13 @@
 
 
 /* use gcc endianness definitions when available */
-#if defined(__GNUC__) && !defined(__APPLE__)
-	#include <endian.h>
+#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__MINGW32__)
+	#if defined(__FreeBSD__) || defined(__OpenBSD__)
+		#include <sys/endian.h>
+	#else
+		#include <endian.h>
+	#endif
+
 	#if __BYTE_ORDER == __LITTLE_ENDIAN
 		#define CONF_ARCH_ENDIAN_LITTLE 1
 	#elif __BYTE_ORDER == __BIG_ENDIAN