From 691d2bd73332fcff869860b3e6a2e37a04f737f2 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 3 Jun 2008 21:20:18 +0000 Subject: [PATCH] Update utsname to use proper compatible interface to avoid API issues. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@123 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- include/sys/utsname.h | 4 +++- modules/spl/spl-generic.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/sys/utsname.h b/include/sys/utsname.h index 7b1563d4b..d4b9dc8ae 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -3,6 +3,8 @@ #include -#define utsname system_utsname +extern struct new_utsname *__utsname(void); + +#define utsname (*__utsname()) #endif /* SPL_UTSNAME_H */ diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 721772762..3027c7108 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #ifdef DEBUG_SUBSYSTEM @@ -94,6 +95,12 @@ ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result) } EXPORT_SYMBOL(ddi_strtoul); +struct new_utsname *__utsname(void) +{ + return init_utsname(); +} +EXPORT_SYMBOL(__utsname); + static int set_hostid(void) {