More endianness for platforms
[fio.git] / os / os-freebsd.h
index 317d403f3bd3f228deeaf7d45f00312986c65be3..1a4f11319b70fe118f2bdac80594362a22d7438b 100644 (file)
@@ -5,6 +5,7 @@
 #include <sys/sysctl.h>
 #include <sys/disk.h>
 #include <sys/thr.h>
+#include <sys/endian.h>
 
 #include "../file.h"
 
 
 #define OS_MAP_ANON            MAP_ANON
 
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define FIO_LITTLE_ENDIAN
+#else
+#define FIO_BIG_ENDIAN
+#endif
+
+#define fio_swap16(x)  bswap16(x)
+#define fio_swap32(x)  bswap32(x)
+#define fio_swap64(x)  bswap64(x)
+
 typedef off_t off64_t;
 
 static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)