Commit 86313c488a6848b7ec2ba04e74f25f79dd32a0b7 in mainline introduced enum umh_wait. This patch allows one to build ocfs2 with kernels having/ not having that change.
Signed-off-by: Sunil Mushran <[EMAIL PROTECTED]> Signed-off-by: Joel Becker <[EMAIL PROTECTED]> --- Makefile | 3 ++- configure.in | 5 +++++ kapi-compat/include/umh_wait.h | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletions(-) create mode 100644 kapi-compat/include/umh_wait.h diff --git a/Makefile b/Makefile index c1ebc15..b937c2b 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,8 @@ KAPI_COMPAT_FILES = \ kapi-compat/include/compiler.h \ kapi-compat/include/highmem.h \ kapi-compat/include/sync_mapping_range.h \ - kapi-compat/include/fpath.h + kapi-compat/include/fpath.h \ + kapi-compat/include/umh_wait.h PATCH_FILES = diff --git a/configure.in b/configure.in index 62588ac..93f1558 100644 --- a/configure.in +++ b/configure.in @@ -189,6 +189,11 @@ OCFS2_CHECK_KERNEL([f_path in fs.h], fs.h, AC_SUBST(NO_F_PATH_IN_STRUCT_FILE) KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS fpath.h" +kmod_compat_header="" +OCFS2_CHECK_KERNEL([enum umh_wait in kmod.h], kmod.h, + , kmod_compat_header="umh_wait.h", [umh_wait]) +KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $kmod_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/umh_wait.h b/kapi-compat/include/umh_wait.h new file mode 100644 index 0000000..42a082b --- /dev/null +++ b/kapi-compat/include/umh_wait.h @@ -0,0 +1,10 @@ +#ifndef KAPI_KMOD_H +#define KAPI_KMOD_H + +enum umh_wait { + UMH_NO_WAIT = -1, /* don't wait at all */ + UMH_WAIT_EXEC = 0, /* wait for the exec, but not the process */ + UMH_WAIT_PROC = 1, /* wait for the process to complete */ +}; + +#endif -- 1.5.2.5 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-devel