]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: Include linux/uaccess.h rather than asm/uaccess.h if present
authorSeth Forshee <seth.forshee@canonical.com>
Tue, 22 Aug 2017 12:59:11 +0000 (07:59 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 20 Sep 2017 17:27:08 +0000 (13:27 -0400)
Starting with Linux 4.12 there is a module build error on s390
due to asm/uaccess.h using a macro defined in the common header.
The common header has been around since 2.6.18 and has always
included asm/uaccess.h, so switch to using the common header
whenever it is present.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-on: https://gerrit.openafs.org/12714
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 962f4838dc461567d896304f617a0923745d13d5)

Reviewed-on: https://gerrit.openafs.org/12718
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 7073408688da021864bba59c592e8924e05adb91)

Change-Id: Ie58cfcf48aa80c18f19cbfc65f87363b154e96ee
Reviewed-on: https://gerrit.openafs.org/12717
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
acinclude.m4
src/afs/LINUX/osi_machdep.h
src/afs/sysincludes.h
src/rx/LINUX/rx_knet.c

index ee40b4109a3bb2b4745eaa33043e104ceab54ef3..d80cacd780ffc3482965c453a85bda1f4bf8d4cd 100644 (file)
@@ -877,6 +877,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_HEADER([semaphore.h])
                 AC_CHECK_LINUX_HEADER([seq_file.h])
                 AC_CHECK_LINUX_HEADER([sched/signal.h])
+                AC_CHECK_LINUX_HEADER([uaccess.h])
 
                 dnl Type existence checks
                 AC_CHECK_LINUX_TYPE([struct vfs_path], [dcache.h])
index 9008f7732e1219439278138b28aa84256c689782..ce8cabf6ee42d4ac724f52abe75c65df68a2b50f 100644 (file)
@@ -123,7 +123,11 @@ wakeup(void *event)
 #define IsAfsVnode(V) ((V)->i_sb == afs_globalVFS)     /* test superblock instead */
 #define SetAfsVnode(V)                                 /* unnecessary */
 
+#if defined(HAVE_LINUX_UACCESS_H)
+#include <linux/uaccess.h>
+#else
 #include <asm/uaccess.h>
+#endif
 
 #define copyin(F, T, C)  (copy_from_user ((char*)(T), (char*)(F), (C)) > 0 ? EFAULT : 0)
 static inline long copyinstr(char *from, char *to, int count, int *length) {
index c2abb373a3e5bfd7e6a5bfef92cdc65a3fc0e26c..1898e1e28c4cecf555cd853a6d04218533f778bf 100644 (file)
@@ -151,7 +151,11 @@ struct coda_inode_info {
 struct xfs_inode_info {
 };
 # endif
-# include <asm/uaccess.h>
+# if defined(HAVE_LINUX_UACCESS_H)
+#  include <linux/uaccess.h>
+# else
+#  include <asm/uaccess.h>
+# endif
 # include <linux/list.h>
 # include <linux/dcache.h>
 # include <linux/mount.h>
index 1a5cfdefa004ff3366c843077fc514659c4d83aa..29e73a1422f61826e19f2694b94e35f6773a0264 100644 (file)
 
 #include <linux/version.h>
 #include "rx/rx_kcommon.h"
+#if defined(HAVE_LINUX_UACCESS_H)
+#include <linux/uaccess.h>
+#else
 #include <asm/uaccess.h>
+#endif
 #ifdef ADAPT_PMTU
 #include <linux/errqueue.h>
 #include <linux/icmp.h>