Fix build on Linux 7.2 - #374
Closed
zukunftsfirmaDE wants to merge 1 commit into
Closed
zukunftsfirmaDE wants to merge 1 commit into
zukunftsfirmaDE wants to merge 1 commit into
Conversation
Linux 7.2 breaks the build in two independent ways. strncpy() is gone: it is no longer declared in <linux/string.h> and the symbol is no longer available, completing the long-running migration to strscpy(). The driver calls it in ten places and depends on its NUL-padding semantics, which strscpy() does not provide (it also truncates at count - 1), so a private implementation is added rather than converting the call sites. struct cfg80211_ops::remain_on_channel gained a trailing "const u8 *rx_addr" argument, so cfg80211_rtw_remain_on_channel no longer matches the callback type. Both changes are guarded on LINUX_VERSION_CODE >= 7.2.0 and are inactive on older kernels. Tested on 7.2.3 (clang 23, ThinLTO) and on 7.0.10 (gcc): both build with no errors and produce a module with the expected vermagic. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SXU8myb15KhDHtRu8vLHsz
Author
|
@iav did the work already at the same time as myself. Closing my PR. |
Collaborator
|
Thanks for your PR anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linux 7.2 breaks the build in two independent ways.
strncpy() is gone: it is no longer declared in <linux/string.h> and the symbol is no longer available, completing the long-running migration to strscpy(). The driver calls it in ten places and depends on its NUL-padding semantics, which strscpy() does not provide (it also truncates at count - 1), so a private implementation is added rather than converting the call sites.
struct cfg80211_ops::remain_on_channel gained a trailing "const u8 *rx_addr" argument, so cfg80211_rtw_remain_on_channel no longer matches the callback type.
Both changes are guarded on LINUX_VERSION_CODE >= 7.2.0 and are inactive on older kernels.
Tested on 7.2.3 (clang 23, ThinLTO) and on 7.0.10 (gcc): both build with no errors and produce a module with the expected vermagic.