From 17303da1c84e5a0a38f59ad66dfe1f1eb78bf229 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 9 May 2019 09:44:56 +0200 Subject: [PATCH] spl: fix build with linux 5.1 Upstream issue: https://github.com/zfsonlinux/zfs/issues/8697 Upstream fix (zfs repo): 782dfae3218b5f2029ce78722b999cb04e8ef001 This can't be applied cleanly as a patch, since spl has been moved into the zfs repo since 0.7.13. --- pkgs/os-specific/linux/spl/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix index bf435cc862c1a5..4e49256be9fcf8 100644 --- a/pkgs/os-specific/linux/spl/default.nix +++ b/pkgs/os-specific/linux/spl/default.nix @@ -21,6 +21,11 @@ stdenv.mkDerivation rec { patches = [ ./install_prefix.patch ]; + # Backported fix for 0.7.13 to build with 5.1, please remove when updating to 0.7.14 + postPatch = optionalString (versionAtLeast kernel.version "5.1") '' + sed -i 's/get_ds()/KERNEL_DS/g' module/spl/spl-vnode.c + ''; + nativeBuildInputs = [ autoreconfHook ] ++ kernel.moduleBuildDependencies; hardeningDisable = [ "fortify" "stackprotector" "pic" ];