Commit 631d1febab8e546e3bb800bdfe2c212b8adf87de in mainline introduces two new calls in configfs, configfs_depend_item() and configfs_undepend_item(). This patch allows one to build ocfs2 with kernels having/not having this change.
Signed-off-by: Sunil Mushran <[EMAIL PROTECTED]> Signed-off-by: Joel Becker <[EMAIL PROTECTED]> --- Makefile | 3 ++- configure.in | 5 +++++ kapi-compat/include/configfs.h | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletions(-) create mode 100644 kapi-compat/include/configfs.h diff --git a/Makefile b/Makefile index 1d27943..1553e54 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ KAPI_COMPAT_FILES = \ kapi-compat/include/drop_nlink.h \ kapi-compat/include/slab.h \ kapi-compat/include/fs_rename_does_d_move.h \ - kapi-compat/include/sysctl.h + kapi-compat/include/sysctl.h \ + kapi-compat/include/configfs.h PATCH_FILES = diff --git a/configure.in b/configure.in index 28e1198..fb2b8e2 100644 --- a/configure.in +++ b/configure.in @@ -220,6 +220,11 @@ OCFS2_CHECK_KERNEL([enum FS_OCFS2 in sysctl.h], sysctl.h, , sysctl_compat_header="sysctl.h", [FS_OCFS2]) KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $sysctl_compat_header" +configfs_compat_header="" +OCFS2_CHECK_KERNEL([configfs_depend_item() in configfs.h], configfs.h, + , configfs_compat_header="configfs.h", [configfs_depend_item()]) +KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $configfs_compat_header" + # 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 diff --git a/kapi-compat/include/configfs.h b/kapi-compat/include/configfs.h new file mode 100644 index 0000000..cbc11e6 --- /dev/null +++ b/kapi-compat/include/configfs.h @@ -0,0 +1,7 @@ +#ifndef KAPI_CONFIGFS_H +#define KAPI_CONFIGFS_H + +#define configfs_depend_item(a, b) (0) +#define configfs_undepend_item(a, b) + +#endif -- 1.5.2.5 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-devel