]> granicus.if.org Git - zfs/commitdiff
Update utsname to use proper compatible interface to avoid API issues.
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Tue, 3 Jun 2008 21:20:18 +0000 (21:20 +0000)
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Tue, 3 Jun 2008 21:20:18 +0000 (21:20 +0000)
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@123 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

include/sys/utsname.h
modules/spl/spl-generic.c

index 7b1563d4bf60c51eded0e02dc1fdfd77369fffeb..d4b9dc8aebcc71a419466a9f8b630eeff329733b 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <linux/utsname.h>
 
-#define utsname                                system_utsname
+extern struct new_utsname *__utsname(void);
+
+#define utsname                        (*__utsname())
 
 #endif /* SPL_UTSNAME_H */
index 721772762e3c53686346b4d97b95e2b2bf933df2..3027c7108cb60ae28003cd4b98a5047caf26fac8 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/debug.h>
 #include <sys/proc.h>
 #include <sys/kstat.h>
+#include <sys/utsname.h>
 #include <linux/kmod.h>
 
 #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)
 {