0009-Fix-build-with-Linux-6.8.patch 960 B

12345678910111213141516171819202122232425262728293031323334
  1. From 90e679f1b7caad02e68fa8672be6569eb1b2b76f Mon Sep 17 00:00:00 2001
  2. From: Giulio Benetti <giulio.benetti@benettiengineering.com>
  3. Date: Thu, 17 Apr 2025 18:56:55 +0200
  4. Subject: [PATCH] Fix build with Linux 6.8
  5. With commit:
  6. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d26270061ae66b915138af7cd73ca6f8b85e6b44
  7. strlcpy() has been superseded in favor of strscpy() so let's #define
  8. strlcpy as strscpy if Linux version 6.8+
  9. Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/8
  10. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
  11. ---
  12. mon.c | 4 ++++
  13. 1 file changed, 4 insertions(+)
  14. diff --git a/mon.c b/mon.c
  15. index 2c9c2d9..20b7e20 100644
  16. --- a/mon.c
  17. +++ b/mon.c
  18. @@ -6,6 +6,10 @@
  19. #include "cfg80211.h"
  20. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0))
  21. +#define strlcpy strscpy
  22. +#endif
  23. +
  24. struct wilc_wfi_radiotap_hdr {
  25. struct ieee80211_radiotap_header hdr;
  26. u8 rate;
  27. --
  28. 2.39.5