projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More endianness for platforms
[fio.git]
/
os
/
os-freebsd.h
diff --git
a/os/os-freebsd.h
b/os/os-freebsd.h
index 317d403f3bd3f228deeaf7d45f00312986c65be3..1a4f11319b70fe118f2bdac80594362a22d7438b 100644
(file)
--- a/
os/os-freebsd.h
+++ b/
os/os-freebsd.h
@@
-5,6
+5,7
@@
#include <sys/sysctl.h>
#include <sys/disk.h>
#include <sys/thr.h>
#include <sys/sysctl.h>
#include <sys/disk.h>
#include <sys/thr.h>
+#include <sys/endian.h>
#include "../file.h"
#include "../file.h"
@@
-18,6
+19,16
@@
#define OS_MAP_ANON MAP_ANON
#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)
typedef off_t off64_t;
static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)