Skip to content

Commit

Permalink
nvidia_x11: fix build on kernels before 4.11, fixes #33410
Browse files Browse the repository at this point in the history
  • Loading branch information
lukateras committed Jan 4, 2018
1 parent 1cd9d2f commit 90412f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/os-specific/linux/nvidia-x11/default.nix
Expand Up @@ -24,7 +24,9 @@ in
persistencedSha256 = "1whhcsz6cij1c7pg4h8795rndp4rywx9k75cjlfh0s184lyi9wm2";
prePatch = ''
if [ "$system" = "x86_64-linux" ]; then
sed '1i#include <linux/sched/task_stack.h>' -i kernel/nvidia-uvm/uvm8_va_block.c
local f="kernel/nvidia-uvm/uvm8_va_block.c"
cat ${./task_stack.c} $f > $f.tmp
mv $f.tmp $f

This comment has been minimized.

Copy link
@4z3

4z3 Jan 4, 2018

Contributor

Indentation?

fi
'';
};
Expand Down
5 changes: 5 additions & 0 deletions pkgs/os-specific/linux/nvidia-x11/task_stack.c
@@ -0,0 +1,5 @@
#include <linux/version.h>

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
#include <linux/sched/task_stack.h>
#endif

0 comments on commit 90412f5

Please sign in to comment.