From: Darrick J. Wong Date: Wed, 5 Nov 2014 16:08:32 +0000 (-0500) Subject: libext2fs: fix endian checking bits X-Git-Tag: android-x86-8.1-r1~49^2^2^2^2~416 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=12406b37b2c998758004117eff6f6d593be1f7aa;p=android-x86%2Fexternal-e2fsprogs.git libext2fs: fix endian checking bits Commit 3e683eef936e6d ("define bitwise types and annotate conversion routines") broke the build on various platforms. Turns out that crossing our fingers wasn't such a good idea, so just define it separately. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Theodore Ts'o --- diff --git a/lib/blkid/blkid_types.h.in b/lib/blkid/blkid_types.h.in index 2bb3d855..d4c81d01 100644 --- a/lib/blkid/blkid_types.h.in +++ b/lib/blkid/blkid_types.h.in @@ -164,19 +164,4 @@ typedef long __s64; #undef __S64_TYPEDEF #undef __U64_TYPEDEF -#ifdef __CHECKER__ -#define __bitwise __attribute__((bitwise)) -#define __force __attribute__((force)) -#else -#define __bitwise -#define __force -#endif - -typedef __u16 __bitwise __le16; -typedef __u32 __bitwise __le32; -typedef __u64 __bitwise __le64; -typedef __u16 __bitwise __be16; -typedef __u32 __bitwise __be32; -typedef __u64 __bitwise __be64; - #endif /* _*_TYPES_H */ diff --git a/lib/ext2fs/ext2_types.h.in b/lib/ext2fs/ext2_types.h.in index a00ed7f1..fd572314 100644 --- a/lib/ext2fs/ext2_types.h.in +++ b/lib/ext2fs/ext2_types.h.in @@ -164,6 +164,12 @@ typedef long __s64; #undef __S64_TYPEDEF #undef __U64_TYPEDEF +#endif /* _*_TYPES_H */ + +/* endian checking stuff */ +#ifndef EXT2_ENDIAN_H_ +#define EXT2_ENDIAN_H_ + #ifdef __CHECKER__ #define __bitwise __attribute__((bitwise)) #define __force __attribute__((force)) @@ -179,6 +185,6 @@ typedef __u16 __bitwise __be16; typedef __u32 __bitwise __be32; typedef __u64 __bitwise __be64; -#endif /* _*_TYPES_H */ +#endif /* EXT2_ENDIAN_H_ */ @PUBLIC_CONFIG_HEADER@