SLES10 uses ino_t rather than u64 in its filldir prototype. This patch
adds a check.
Signed-off-by: Jeff Mahoney <[EMAIL PROTECTED]>
---
Config.make.in | 1 +
configure.in | 6 ++++++
fs/ocfs2/Makefile | 4 ++++
fs/ocfs2/dir.c | 8 +++++++-
fs/ocfs2/journal.c | 8 +++++++-
5 files changed, 25 insertions(+), 2 deletions(-)
--- a/Config.make.in 2008-02-02 10:36:30.000000000 -0500
+++ b/Config.make.in 2008-02-02 10:36:30.000000000 -0500
@@ -88,6 +88,7 @@ NO_I_PRIVATE = @NO_I_PRIVATE@
NO_PAGE_MKWRITE = @NO_PAGE_MKWRITE@
NO_VFSMOUNT_IN_GET_SB_BDEV = @NO_VFSMOUNT_IN_GET_SB_BDEV@
NO_READ_MAPPING_PAGE = @NO_READ_MAPPING_PAGE@
+FILLDIR_T_WITH_INO_T = @FILLDIR_T_WITH_INO_T@
OCFS_DEBUG = @OCFS_DEBUG@
--- a/configure.in 2008-02-02 10:36:30.000000000 -0500
+++ b/configure.in 2008-02-02 10:36:30.000000000 -0500
@@ -383,6 +383,12 @@ OCFS2_CHECK_KERNEL([read_mapping_page in
AC_SUBST(NO_READ_MAPPING_PAGE)
KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS read_mapping_page.h"
+FILLDIR_T_WITH_INO_T=
+OCFS2_CHECK_KERNEL([ino_t in filldir_t in fs.h], fs.h,
+ FILLDIR_T_WITH_INO_T=yes, ,
+ [typedef int (\*filldir_t)(void \*, const char \*, int, loff_t, ino_t,
unsigned);])
+AC_SUBST(FILLDIR_T_WITH_INO_T)
+
# using -include has two advantages:
# the source doesn't need to know to include compat headers
# the compat header file names don't go through the search path
--- a/fs/ocfs2/Makefile 2008-02-02 10:36:30.000000000 -0500
+++ b/fs/ocfs2/Makefile 2008-02-02 10:36:30.000000000 -0500
@@ -144,6 +144,10 @@ ifdef NO_READ_MAPPING_PAGE
EXTRA_CFLAGS += -DNO_READ_MAPPING_PAGE
endif
+ifdef FILLDIR_T_WITH_INO_T
+EXTRA_CFLAGS += -DFILLDIR_T_WITH_INO_T
+endif
+
#
# Since SUBDIRS means something to kbuild, define them safely. Do not
# include trailing slashes.
--- a/fs/ocfs2/dir.c 2008-02-02 10:22:49.000000000 -0500
+++ b/fs/ocfs2/dir.c 2008-02-02 10:36:31.000000000 -0500
@@ -965,7 +965,13 @@ struct ocfs2_empty_dir_priv {
unsigned seen_other;
};
static int ocfs2_empty_dir_filldir(void *priv, const char *name, int name_len,
- loff_t pos, u64 ino, unsigned type)
+ loff_t pos,
+#ifdef FILLDIR_T_WITH_INO_T
+ ino_t ino,
+#else
+ u64 ino,
+#endif
+ unsigned type)
{
struct ocfs2_empty_dir_priv *p = priv;
--- a/fs/ocfs2/journal.c 2008-02-02 10:22:49.000000000 -0500
+++ b/fs/ocfs2/journal.c 2008-02-02 10:36:31.000000000 -0500
@@ -1237,7 +1237,13 @@ struct ocfs2_orphan_filldir_priv {
};
static int ocfs2_orphan_filldir(void *priv, const char *name, int name_len,
- loff_t pos, u64 ino, unsigned type)
+ loff_t pos,
+#ifdef FILLDIR_T_WITH_INO_T
+ ino_t ino,
+#else
+ u64 ino,
+#endif
+ unsigned type)
{
struct ocfs2_orphan_filldir_priv *p = priv;
struct inode *iter;
_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel