From: Theodore Ts'o Date: Tue, 2 Sep 2008 12:49:10 +0000 (-0400) Subject: libext2fs: Compile ext2fs_swab64() for all platforms X-Git-Tag: v1.41.2~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e01f9be336274e527cdb794cca2b0c1501e8b0d7;p=thirdparty%2Fe2fsprogs.git libext2fs: Compile ext2fs_swab64() for all platforms Although nothing uses ext2fs_swab64() yet, debian's dpkg-gensymbols picked up the fact that ext2fs_swab64() isn't getting defined on non-x86 platforms. Oops. This patch moves the definition of ext2fs_swab64() to a place where it will be compiled for all architectures. Addresses-Debian-Bug: #497515 Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/ext2fs/bitops.h b/lib/ext2fs/bitops.h index 9181567cc..1d825bbfb 100644 --- a/lib/ext2fs/bitops.h +++ b/lib/ext2fs/bitops.h @@ -241,12 +241,6 @@ _INLINE_ __u16 ext2fs_swab16(__u16 val) return val; } -_INLINE_ __u64 ext2fs_swab64(__u64 val) -{ - return (ext2fs_swab32(val >> 32) | - (((__u64)ext2fs_swab32(val & 0xFFFFFFFFUL)) << 32)); -} - #undef EXT2FS_ADDR #endif /* i386 */ @@ -304,6 +298,12 @@ _INLINE_ __u32 ext2fs_swab32(__u32 val) #endif /* !_EXT2_HAVE_ASM_SWAB */ +_INLINE_ __u64 ext2fs_swab64(__u64 val) +{ + return (ext2fs_swab32(val >> 32) | + (((__u64)ext2fs_swab32(val & 0xFFFFFFFFUL)) << 32)); +} + _INLINE_ int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block) {