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) {