diff options
author | aszlig <aszlig@nix.build> | 2017-11-14 04:30:08 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2017-11-14 04:36:19 +0100 |
commit | f6ae3948bc6aeac8aba70ce28c347c8882d8bf47 (patch) | |
tree | 2409a695978eccaffce091a83f8630e8426292ec /nixos/tests/boot-stage1.nix | |
parent | ba45205b84f5cbb3d68b4d462439f1206573840d (diff) | |
download | nixlib-f6ae3948bc6aeac8aba70ce28c347c8882d8bf47.tar nixlib-f6ae3948bc6aeac8aba70ce28c347c8882d8bf47.tar.gz nixlib-f6ae3948bc6aeac8aba70ce28c347c8882d8bf47.tar.bz2 nixlib-f6ae3948bc6aeac8aba70ce28c347c8882d8bf47.tar.lz nixlib-f6ae3948bc6aeac8aba70ce28c347c8882d8bf47.tar.xz nixlib-f6ae3948bc6aeac8aba70ce28c347c8882d8bf47.tar.zst nixlib-f6ae3948bc6aeac8aba70ce28c347c8882d8bf47.zip |
tests/boot-stage1: Fix build of kcanary module
In bfe9c928c18583d3adfb5978a55b48c392649ef5 the default kernel has been updated to version 4.14 and the declarations for allow_signal() and signal_pending() are no longer exposed via kthread.h, so let's actually use the right header files. I've added a condition for kernel 4.10 and upwards to include the linux/sched/signal.h header file, because that got introduced in version 4.10. Even if the declaration would still reside in kthread.h (I haven't checked) for version 4.10 it won't hurt and the compilation will still succeed. Tested against kernel 4.9 and 4.14 and the build now succeeds. Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'nixos/tests/boot-stage1.nix')
-rw-r--r-- | nixos/tests/boot-stage1.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/tests/boot-stage1.nix b/nixos/tests/boot-stage1.nix index 50186525cf39..eeaca9f50edc 100644 --- a/nixos/tests/boot-stage1.nix +++ b/nixos/tests/boot-stage1.nix @@ -21,11 +21,16 @@ import ./make-test.nix ({ pkgs, ... }: { # the boot process kills any kthread by accident, like what happened in # issue #15226. kcanary = compileKernelModule "kcanary" '' + #include <linux/version.h> #include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/kthread.h> #include <linux/sched.h> + #include <linux/signal.h> + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) + #include <linux/sched/signal.h> + #endif struct task_struct *canaryTask; |