Fix build failures with older kernel headers and non-Linux systems#58
Merged
ThomasHabets merged 1 commit intoThomasHabets:arping-2.xfrom Dec 27, 2025
Merged
Conversation
- landlock.c: Guard LANDLOCK_ACCESS_FS_REFER with #ifdef, as it was added in kernel 5.19 (Landlock ABI v2) and is not available in older kernel headers. This follows the existing pattern used for LANDLOCK_ACCESS_FS_TRUNCATE and LANDLOCK_ACCESS_FS_IOCTL_DEV. - no_new_privs.c: Guard linux/prctl.h and sys/prctl.h includes with #ifdef __linux__, as these headers are Linux-specific and do not exist on macOS/BSD. The functionality is already runtime-guarded by HAS_NO_NEW_PRIVS.
Owner
|
Oh, that's an embarrassing mistake. Thanks for the fix. I adjusted it a bit to have includes of the If you could confirm that this looks good to you know, I think this is important enough to do a 2.28 fix release. :-/ |
Contributor
Author
|
Confirming that building from HEAD worked just fine on macOS. |
Owner
|
Thanks. I'll likely do another release tomorrow to not have the latest version fail to build. |
Owner
|
I've released 2.28, and added a github action building on OpenBSD to prevent it happening again. May add others, but at least it's quite different from Linux. |
Contributor
Author
|
I've opened #59 to add a macOS testing workflow. |
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.
Hi. I'm a maintainer for Homebrew. While building arming 2.27 for distribution we encountered some build failures. The changes in this PR help with portability and resolve those failures.
LANDLOCK_ACCESS_FS_REFERwas added in kernel 5.19 and is not available in older kernel headers.linux/prctl.handsys/prctl.hdo not exist on macOS/BSD.