From: Tony Breeds Date: Tue, 10 Feb 2009 03:37:44 +0000 (+1100) Subject: Add/Correct libgcc function prototypes X-Git-Tag: yaboot-1.3.17~10 X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=commitdiff_plain;h=26a865f06c37278eebc6e329e6aa99f52906c713 Add/Correct libgcc function prototypes Add a prototype for ffs() from libgcc. Instead of using log2 in reisrfs which has a different prototype to the one libgcc, call the function reiser_log2() Signed-off-by: Tony Breeds --- diff --git a/include/ext2fs/bitops.h b/include/ext2fs/bitops.h index 85fa7d7..ae6ec34 100644 --- a/include/ext2fs/bitops.h +++ b/include/ext2fs/bitops.h @@ -410,6 +410,9 @@ _INLINE_ __u32 ext2fs_swab32(__u32 val) #endif /* !_EXT2_HAVE_ASM_SWAB */ #if !defined(_EXT2_HAVE_ASM_FINDBIT_) +/* Use the prototype from builtin_ffs() */ +extern int ffs(unsigned int); + _INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size) { char *cp = (unsigned char *) addr; diff --git a/second/fs_reiserfs.c b/second/fs_reiserfs.c index 588a0ef..b0c3ac0 100644 --- a/second/fs_reiserfs.c +++ b/second/fs_reiserfs.c @@ -156,7 +156,7 @@ reiserfs_close( struct boot_file_t *file ) static __inline__ __u32 -log2( __u32 word ) +reiserfs_log2( __u32 word ) { int i = 0; while( word && (word & (1 << ++i)) == 0 ); @@ -428,7 +428,7 @@ reiserfs_read_super( void ) INFO->version = le16_to_cpu(super.s_version); INFO->blocksize = le16_to_cpu(super.s_blocksize); - INFO->blocksize_shift = log2( INFO->blocksize ); + INFO->blocksize_shift = reiserfs_log2( INFO->blocksize ); INFO->journal_block = le32_to_cpu(super.s_journal_block); INFO->journal_block_count = le32_to_cpu(super.s_orig_journal_size);