]> wimlib.net Git - wimlib/blobdiff - include/wimlib/endianness.h
Fix building on NetBSD
[wimlib] / include / wimlib / endianness.h
index ed0b7ec443eb26cf679810a26820278306d6db25..38e2bc2c042ab64c9b642b6aab712196a763cc79 100644 (file)
 #include "wimlib/compiler.h"
 #include "wimlib/types.h"
 
+#ifdef HAVE_SYS_ENDIAN_H
+   /* Needed on NetBSD to stop system bswap macros from messing things up */
+#  include <sys/endian.h>
+#  undef bswap16
+#  undef bswap32
+#  undef bswap64
+#endif
+
 /* Watch out for conflict with ntfs-3g/endians.h ... */
 #ifndef _NTFS_ENDIANS_H