]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Fix build failure on s390x with Linux kernel 4.12
authorAnders Kaseorg <andersk@mit.edu>
Wed, 30 Aug 2017 02:51:43 +0000 (22:51 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Thu, 31 Aug 2017 03:41:56 +0000 (23:41 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
debian/changelog
debian/patches/Linux-Include-linux-uaccess.h-rather-than-asm-uacces.patch [new file with mode: 0644]
debian/patches/series

index 33c70cc29f7ffb1ea31bf7e7fc6d298b01dd7b65..9280907a8a3723f2194d7c5073a60a86f27883d1 100644 (file)
@@ -2,6 +2,9 @@ openafs (1.6.21-3) UNRELEASED; urgency=medium
 
   * Build documentation with FORCE_SOURCE_DATE=1, without which pdfTeX
     refuses to behave fully reproducibly.
+  * debian/patches:
+    - Linux-Include-linux-uaccess.h-rather-than-asm-uacces.patch: Fix
+    build failure on s390x with Linux kernel 4.12.  (LP: #1711835)
 
  -- Anders Kaseorg <andersk@mit.edu>  Thu, 24 Aug 2017 18:08:04 -0400
 
diff --git a/debian/patches/Linux-Include-linux-uaccess.h-rather-than-asm-uacces.patch b/debian/patches/Linux-Include-linux-uaccess.h-rather-than-asm-uacces.patch
new file mode 100644 (file)
index 0000000..7ddfc2e
--- /dev/null
@@ -0,0 +1,95 @@
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Tue, 22 Aug 2017 07:59:11 -0500
+Subject: Linux: Include linux/uaccess.h rather than asm/uaccess.h if present
+
+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
+---
+ acinclude.m4                | 1 +
+ src/afs/LINUX/osi_machdep.h | 4 ++++
+ src/afs/sysincludes.h       | 6 +++++-
+ src/rx/LINUX/rx_knet.c      | 4 ++++
+ 4 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index ee40b4109a..d80cacd780 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -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])
+diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h
+index 9008f7732e..ce8cabf6ee 100644
+--- a/src/afs/LINUX/osi_machdep.h
++++ b/src/afs/LINUX/osi_machdep.h
+@@ -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) {
+diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h
+index c2abb373a3..1898e1e28c 100644
+--- a/src/afs/sysincludes.h
++++ b/src/afs/sysincludes.h
+@@ -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>
+diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c
+index 1a5cfdefa0..29e73a1422 100644
+--- a/src/rx/LINUX/rx_knet.c
++++ b/src/rx/LINUX/rx_knet.c
+@@ -18,7 +18,11 @@
+ #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>
+-- 
+2.14.1
+
index eb52f3c13dd78cd24ce4bb7eee1516769bbbb816..4370086041e6fa1799ba52f206b2b89bf8a398e6 100644 (file)
@@ -1,3 +1,4 @@
 0003-Add-dummy-exit-command-for-afsd-to-do-nothing.patch
 AFS_component_version_number.c-Respect-SOURCE_DATE_E.patch
 Linux-4.13-use-designated-initializers-where-require.patch
+Linux-Include-linux-uaccess.h-rather-than-asm-uacces.patch