We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e91241a commit 9058210Copy full SHA for 9058210
src/generic/endian.h
@@ -74,7 +74,18 @@
74
#define le64toh(x) OSSwapLittleToHostInt64(x)
75
76
#else
77
-#include <endian.h>
+
78
+#if defined(linux) || defined(__OpenBSD__)
79
+# ifdef HAVE_ENDIAN_H
80
+# include <endian.h> /* attempt to define endianness */
81
+# else
82
+# include <machine/endian.h> /* on older OpenBSD */
83
+# endif
84
+#endif
85
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
86
+#include <sys/endian.h> /* attempt to define endianness */
87
88
89
#endif
90
91
#endif // ENDIAN_H
0 commit comments