Whamcloud - gitweb
ext2fs.h: move ext2fs_init_csum_seed() outside of EXT2_CUSTOM_MEMORY_ROUTINES
authorTheodore Ts'o <tytso@mit.edu>
Mon, 10 Sep 2012 01:43:08 +0000 (21:43 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Sep 2012 01:43:08 +0000 (21:43 -0400)
The function ext2fs_init_csum_seed() has nothing to do with the
ext2fs_get_mem()/ext2fs_get_memzero()/ext2fs_get_array()/ext2fs_get_arrayzero()
functions.  (This define is there so that on platforms where we need
to use the standard C functions, they can be replaced --- this is
primarily needed when trying to compile libext2fs for strange,
non-quite-standards-compliant platforms, such as Windows.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/ext2fs.h

index 9927875..5892b14 100644 (file)
@@ -1555,8 +1555,6 @@ extern int ext2fs_fstat(int fd, ext2fs_struct_stat *buf);
 #endif
 #endif
 
-#ifndef EXT2_CUSTOM_MEMORY_ROUTINES
-#include <string.h>
 _INLINE_ void ext2fs_init_csum_seed(ext2_filsys fs)
 {
        if (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
@@ -1567,6 +1565,8 @@ _INLINE_ void ext2fs_init_csum_seed(ext2_filsys fs)
                                         sizeof(fs->super->s_uuid));
 }
 
+#ifndef EXT2_CUSTOM_MEMORY_ROUTINES
+#include <string.h>
 /*
  *  Allocate memory
  */