summaryrefslogtreecommitdiffstats
path: root/network/broadcom-wl/patches/014-linux414.patch
diff options
context:
space:
mode:
Diffstat (limited to 'network/broadcom-wl/patches/014-linux414.patch')
-rw-r--r--network/broadcom-wl/patches/014-linux414.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/network/broadcom-wl/patches/014-linux414.patch b/network/broadcom-wl/patches/014-linux414.patch
new file mode 100644
index 0000000000..0576aa5cf9
--- /dev/null
+++ b/network/broadcom-wl/patches/014-linux414.patch
@@ -0,0 +1,37 @@
+From: Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar>
+Date: Fri, 29 Dec 2017 23:44:24 -0400
+Subject: linux414
+Origin: https://bugs.debian.org/885885
+
+linux 4.14 changed the kernel_read function prototype.
+---
+ src/shared/linux_osl.c | 12 +++++++++++-
+ 1 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+index 9adc392..b24a973 100644
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -1076,11 +1076,21 @@ osl_os_get_image_block(char *buf, int len, void *image)
+ {
+ struct file *fp = (struct file *)image;
+ int rdlen;
++ loff_t pos;
+
+ if (!image)
+ return 0;
+
+- rdlen = kernel_read(fp, fp->f_pos, buf, len);
++ pos = fp->f_pos;
++ rdlen = kernel_read(fp,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
++ pos,
++#endif
++ buf, len
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
++ ,&pos
++#endif
++ );
+ if (rdlen > 0)
+ fp->f_pos += rdlen;
+