summaryrefslogtreecommitdiff
path: root/blktrace.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-10-05 15:16:19 +0200
committerJens Axboe <axboe@suse.de>2005-10-05 15:16:19 +0200
commit1e3c4225dbb79342c8c341b7a726663805945e5a (patch)
treed12d5c8bd0f76575e4c1d4043540ec70228361f7 /blktrace.h
parent4ac5831f3396d504c6397a09be0f60c6f25d705e (diff)
downloadblktrace-1e3c4225dbb79342c8c341b7a726663805945e5a.tar.gz
blktrace-1e3c4225dbb79342c8c341b7a726663805945e5a.tar.bz2
[PATCH] Better endianness check
Diffstat (limited to 'blktrace.h')
-rw-r--r--blktrace.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/blktrace.h b/blktrace.h
index c1e5df1..48d0486 100644
--- a/blktrace.h
+++ b/blktrace.h
@@ -3,8 +3,8 @@
#include <stdio.h>
#include <byteswap.h>
-#include <asm/types.h>
-#include <asm/byteorder.h>
+#include <endian.h>
+
#include "blktrace_api.h"
#define MINORBITS 20
@@ -44,14 +44,14 @@ extern FILE *ofp;
#define CHECK_MAGIC(t) (((t)->magic & 0xffffff00) == BLK_IO_TRACE_MAGIC)
#define SUPPORTED_VERSION (0x05)
-#if defined(__LITTLE_ENDIAN_BITFIELD)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
#define be16_to_cpu(x) __bswap_16(x)
#define be32_to_cpu(x) __bswap_32(x)
#define be64_to_cpu(x) __bswap_64(x)
#define cpu_to_be16(x) __bswap_16(x)
#define cpu_to_be32(x) __bswap_32(x)
#define cpu_to_be64(x) __bswap_64(x)
-#elif defined(__BIG_ENDIAN_BITFIELD)
+#elif __BYTE_ORDER == __BIT_ENDIAN
#define be16_to_cpu(x) (x)
#define be32_to_cpu(x) (x)
#define be64_to_cpu(x) (x)