git.iko.soy/typeable/nixpkgs
on master help sign in
mwprocapture: patch to fix build for linux 4.14
commitce8dea6bdd18846579d32d0bcec94717bf616b41 authorCray Elliott <MP2E@archlinux.us> dateMon 13 Nov 2017, 19:52 (9 years ago) parentf6ae394
2 files changed+33−1
pkgs/os-specific/linux/mwprocapture/default.nix+2−1 pkgs/os-specific/linux/mwprocapture/linux_4_14_fix.patch+31
pkgs/os-specific/linux/mwprocapture/default.nix+2−1
@@ -25,7 +25,8 @@ stdenv.mkDerivation rec {
2525 sha256 = "1arwnwrq52rs8g9zfxw8saip40vc3201sf7qnbqd2p23h8vzwb8i";
2626 };
2727
28− patches = [] ++ optional (versionAtLeast kernel.version "4.13") ./linux_4_13_fix.patch;
28+ patches = [] ++ optional (versionAtLeast kernel.version "4.13") ./linux_4_13_fix.patch
29+ ++ optional (versionAtLeast kernel.version "4.14") ./linux_4_14_fix.patch;
2930
3031 preConfigure =
3132 ''
pkgs/os-specific/linux/mwprocapture/linux_4_14_fix.patchnew file+31
@@ -0,0 +1,31 @@
1+diff -Naur ProCaptureForLinux_3589/src/sources/ospi/linux-file.c ProCaptureForLinux_3589_new/src/sources/ospi/linux-file.c
2+--- ProCaptureForLinux_3589/src/sources/ospi/linux-file.c 2017-08-17 02:46:07.000000000 -0700
3++++ ProCaptureForLinux_3589_new/src/sources/ospi/linux-file.c 2017-11-13 19:49:46.710616748 -0800
4+@@ -7,8 +7,8 @@
5+
6+ #include "linux-file.h"
7+
8+-#include <asm/uaccess.h>
9+ #include <linux/sched.h>
10++#include <asm/uaccess.h>
11+
12+ struct file *linux_file_open(const char *path, int flags, int mode)
13+ {
14+@@ -35,7 +35,7 @@
15+
16+ oldfs = get_fs();
17+ set_fs(get_ds());
18+- ret = vfs_read(file, data, size, &offset);
19++ ret = kernel_read(file, data, size, &offset);
20+ set_fs(oldfs);
21+
22+ return ret;
23+@@ -48,7 +48,7 @@
24+
25+ oldfs = get_fs();
26+ set_fs(get_ds());
27+- ret = vfs_write(file, data, size, &offset);
28++ ret = kernel_write(file, data, size, &offset);
29+ set_fs(oldfs);
30+
31+ return ret;