From c8d2a8ff00a329de6fd80728f135f8224e1a5130 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 28 Feb 2008 16:58:49 -0800 Subject: [PATCH] byteorder fixup --- src/include/byteorder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/byteorder.h b/src/include/byteorder.h index 08aa4c9339ebb..2067aa6db2cc6 100644 --- a/src/include/byteorder.h +++ b/src/include/byteorder.h @@ -39,7 +39,7 @@ struct __le64 { __u64 v; } __attribute__ ((packed)); struct __le32 { __u32 v; } __attribute__ ((packed)); struct __le16 { __u16 v; } __attribute__ ((packed)); -#ifdef WORDS_BIGENDIAN +#if __BYTEORDER == __BIG_ENDIAN static inline __le64 cpu_to_le64(__u64 v) { __le64 r = { swab64(v) }; return r; } static inline __le32 cpu_to_le32(__u32 v) { __le32 r = { swab32(v) }; return r; } static inline __le16 cpu_to_le16(__u16 v) { __le16 r = { swab16(v) }; return r; } @@ -61,7 +61,7 @@ typedef __u64 __le64; typedef __u32 __le32; typedef __u16 __le16; -#ifdef WORDS_BIGENDIAN +#if __BYTEORDER == __BIG_ENDIAN # define cpu_to_le64(x) swab64((x)) # define le64_to_cpu(x) swab64((x)) # define cpu_to_le32(x) swab32((x)) -- 2.39.5