]> git.ozlabs.org Git - tonyb-yaboot.git/commitdiff
Add/Correct libgcc function prototypes
authorTony Breeds <tony@bakeyournoodle.com>
Tue, 10 Feb 2009 03:37:44 +0000 (14:37 +1100)
committerTony Breeds <tony@bakeyournoodle.com>
Tue, 18 Oct 2011 04:11:10 +0000 (15:11 +1100)
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 <tony@bakeyournoodle.com>
include/ext2fs/bitops.h
second/fs_reiserfs.c

index 85fa7d7f4b9964f970fcfecad9fa75ce38c2f7d0..ae6ec34a4a5e4939ca25bbec7ea5e9f15acfceed 100644 (file)
@@ -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;
index 588a0efcfb050493da22e4c643ab86877a863c60..b0c3ac00ee6743c3c6a21c8173462921446be0c9 100644 (file)
@@ -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);