kernel-4.14-buildfix.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From: Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar>
  2. Date: Fri, 29 Dec 2017 23:44:24 -0400
  3. Subject: linux414
  4. Origin: https://bugs.debian.org/885885
  5. linux 4.14 changed the kernel_read function prototype.
  6. ---
  7. src/shared/linux_osl.c | 12 +++++++++++-
  8. 1 file changed, 11 insertions(+), 1 deletion(-)
  9. diff -Nurp broadcom-wl-6.30.223.271.orig/src/shared/linux_osl.c broadcom-wl-6.30.223.271/src/shared/linux_osl.c
  10. --- broadcom-wl-6.30.223.271.orig/src/shared/linux_osl.c 2020-01-11 01:17:02.688960782 +0200
  11. +++ broadcom-wl-6.30.223.271/src/shared/linux_osl.c 2020-01-11 01:37:41.527449819 +0200
  12. @@ -1076,11 +1076,21 @@ osl_os_get_image_block(char *buf, int le
  13. {
  14. struct file *fp = (struct file *)image;
  15. int rdlen;
  16. + loff_t pos;
  17. if (!image)
  18. return 0;
  19. - rdlen = kernel_read(fp, fp->f_pos, buf, len);
  20. + pos = fp->f_pos;
  21. + rdlen = kernel_read(fp,
  22. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
  23. + pos,
  24. +#endif
  25. + buf, len
  26. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
  27. + ,&pos
  28. +#endif
  29. + );
  30. if (rdlen > 0)
  31. fp->f_pos += rdlen;