X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-linux.h;h=8d3b97ea1f04015af100c990aba4d50914f99df9;hp=a36552ba68ba93caf6ca58e5fc9761fc53c0b88d;hb=610a730c79c90298d41cb3138041e83ba9cdb1d2;hpb=39e8e01691c9d5765795417ee49a40d5ae08cb8b;ds=sidebyside diff --git a/os/os-linux.h b/os/os-linux.h index a36552ba..8d3b97ea 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -12,6 +12,7 @@ #include #include #include +#include #include "indirect.h" #include "binject.h" @@ -286,6 +287,14 @@ static inline int fio_lookup_raw(dev_t dev, int *majdev, int *mindev) #define FIO_MADV_FREE MADV_REMOVE #endif +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define FIO_LITTLE_ENDIAN +#elif __BYTE_ORDER == __BIG_ENDIAN +#define FIO_BIG_ENDIAN +#else +#error "Unknown endianness" +#endif + #define CACHE_LINE_FILE \ "/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size"