]> git.pld-linux.org Git - packages/zfs.git/commitdiff
- fix building with linux 4.0 auto/th/zfs-0.6.3-8
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 19 Apr 2015 12:20:58 +0000 (14:20 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 19 Apr 2015 12:20:58 +0000 (14:20 +0200)
- rel 8

linux-4.0.patch [new file with mode: 0644]
zfs.spec

diff --git a/linux-4.0.patch b/linux-4.0.patch
new file mode 100644 (file)
index 0000000..ed5965a
--- /dev/null
@@ -0,0 +1,38 @@
+--- zfs-0.6.3/config/kernel-bdi-setup-and-register.m4.orig     2014-06-12 22:58:09.000000000 +0200
++++ zfs-0.6.3/config/kernel-bdi-setup-and-register.m4  2015-04-19 14:12:52.429710415 +0200
+@@ -9,8 +9,13 @@
+       [AC_MSG_CHECKING([whether bdi_setup_and_register() is available])
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
+               #include <linux/backing-dev.h>
++              #include <linux/version.h>
+       ], [
++              #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++              int r = bdi_setup_and_register(NULL, NULL);
++              #else
+               int r = bdi_setup_and_register(NULL, NULL, 0);
++              #endif
+               r = *(&r);
+       ], [bdi_setup_and_register], [mm/backing-dev.c], [
+               AC_MSG_RESULT(yes)
+--- zfs-0.6.3/module/zfs/zfs_vfsops.c~ 2014-06-12 22:58:09.000000000 +0200
++++ zfs-0.6.3/module/zfs/zfs_vfsops.c  2015-04-19 14:14:13.503040887 +0200
+@@ -67,6 +67,7 @@
+ #include <sys/spa_boot.h>
+ #include <sys/zpl.h>
+ #include "zfs_comutil.h"
++#include "linux/version.h"
+ /*ARGSUSED*/
+@@ -1241,7 +1241,11 @@
+       zsb->z_bdi.ra_pages = 0;
+       sb->s_bdi = &zsb->z_bdi;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++      error = -bdi_setup_and_register(&zsb->z_bdi, "zfs");
++#else
+       error = -bdi_setup_and_register(&zsb->z_bdi, "zfs", BDI_CAP_MAP_COPY);
++#endif
+       if (error)
+               goto out;
+ #endif /* HAVE_BDI */
index 275cafda8b37e150178d49d87a4c8177084e7a84..5f5d29d5adc5d4788df09b2c541ce592f413b14c 100644 (file)
--- a/zfs.spec
+++ b/zfs.spec
@@ -22,7 +22,7 @@ exit 1
 %define                _duplicate_files_terminate_build        0
 
 %define        pname   zfs
-%define        rel     7
+%define        rel     8
 Summary:       Native Linux port of the ZFS filesystem
 Summary(pl.UTF-8):     Natywny linuksowy port systemu plików ZFS
 Name:          %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
@@ -36,6 +36,7 @@ Patch0:               %{pname}-link.patch
 Patch1:                linux-3.18.patch
 Patch2:                x32.patch
 Patch3:                linux-3.19.patch
+Patch4:                linux-4.0.patch
 URL:           http://zfsonlinux.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -217,6 +218,7 @@ p=`pwd`\
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %{__libtoolize}
This page took 0.15 seconds and 4 git commands to generate.