gentoo-ebuilds/net-wireless/broadcom-sta/files/014-linux414.patch
Sam Petch e20d1bb6ac
net-wireless/broadcom-sta: handle new headers
Handle new header name in kernels >=6.12, handle 6.13 lib80211 code
merge into libiw and fix pointer mismatch compiler error for 6.14

[flow: adjust commit message]

Closes: https://bugs.gentoo.org/947928
Closes: https://bugs.gentoo.org/948947
Closes: https://github.com/gentoo/gentoo/pull/40391
Signed-off-by: Sam Petch <111785134+spetch0x5F@users.noreply.github.com>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
2025-02-24 10:26:19 +01:00

31 lines
748 B
Diff

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.
--- 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;