Newer releases have removed system_utsname in favor of init_uts_ns.name.
This patch adds a check.
Signed-off-by: Jeff Mahoney <[EMAIL PROTECTED]>
---
Config.make.in | 1 +
configure.in | 5 +++++
fs/ocfs2/dlm/Makefile | 4 ++++
fs/ocfs2/dlm/dlmdebug.c | 4 ++++
4 files changed, 14 insertions(+)
--- a/Config.make.in 2008-02-02 11:20:36.000000000 -0500
+++ b/Config.make.in 2008-02-02 11:20:42.000000000 -0500
@@ -92,6 +92,7 @@ FILLDIR_T_WITH_INO_T = @FILLDIR_T_WITH_I
INVALIDATEPAGE_RETURNS_INT = @INVALIDATEPAGE_RETURNS_INT@
DIO_OLD_GET_BLOCKS = @DIO_OLD_GET_BLOCKS@
NO_LINUX_UACCESS_H = @NO_LINUX_UACCESS_H@
+NO_SYSTEM_UTSNAME = @NO_SYSTEM_UTSNAME@
OCFS_DEBUG = @OCFS_DEBUG@
--- a/configure.in 2008-02-02 11:20:41.000000000 -0500
+++ b/configure.in 2008-02-02 11:21:10.000000000 -0500
@@ -405,6 +405,11 @@ OCFS2_CHECK_KERNEL([linux/uaccess.h], ua
NO_LINUX_UACCESS_H=yes, [^#define __LINUX_UACCESS_H__])
AC_SUBST(NO_LINUX_UACCESS_H)
+NO_SYSTEM_UTSNAME=
+OCFS2_CHECK_KERNEL([system_utsname in utsname.h], utsname.h, ,
+ NO_SYSTEM_UTSNAME=yes, [^extern struct new_utsname system_utsname])
+AC_SUBST(NO_SYSTEM_UTSNAME)
+
# 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/dlm/Makefile 2008-02-02 11:20:36.000000000 -0500
+++ b/fs/ocfs2/dlm/Makefile 2008-02-02 11:20:42.000000000 -0500
@@ -54,6 +54,10 @@ ifdef NO_VFSMOUNT_IN_GET_SB_BDEV
EXTRA_CFLAGS += -DNO_VFSMOUNT_IN_GET_SB_BDEV
endif
+ifdef NO_SYSTEM_UTSNAME
+EXTRA_CFLAGS += -DNO_SYSTEM_UTSNAME
+endif
+
DLM_SOURCES += \
dlmast.c \
dlmconvert.c \
--- a/fs/ocfs2/dlm/dlmdebug.c 2008-02-02 11:20:35.000000000 -0500
+++ b/fs/ocfs2/dlm/dlmdebug.c 2008-02-02 11:20:42.000000000 -0500
@@ -204,7 +204,11 @@ static int dlm_dump_all_lock_resources(c
struct list_head *iter;
mlog(ML_NOTICE, "dumping ALL dlm state for node %s\n",
+#ifndef NO_SYSTEM_UTSNAME
system_utsname.nodename);
+#else
+ init_uts_ns.name.nodename);
+#endif
spin_lock(&dlm_domain_lock);
list_for_each(iter, &dlm_domains) {
dlm = list_entry (iter, struct dlm_ctxt, list);
_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel