bsd: add BPF_WORDALIGN#5320
Open
sbogomolov wants to merge 1 commit into
Open
Conversation
sbogomolov
force-pushed
the
bsd-bpf-wordalign
branch
from
July 23, 2026 19:01
4ca1746 to
41265a3
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Contributor
Author
|
Two questions to the reviewer:
|
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.
Description
Add the
BPF_WORDALIGNmacro on Apple and the freebsdlike platforms. DragonFly writes it asroundup2(x, BPF_ALIGNMENT), which expands to the same expression FreeBSD uses, so the two share one definition.Sources
Apple
BPF_WORDALIGN/BPF_ALIGNMENT(net/bpf.h):FreeBSD
BPF_WORDALIGN/BPF_ALIGNMENT(net/bpf.h):DragonFly
BPF_WORDALIGN/BPF_ALIGNMENT(net/bpf.h) androundup2(sys/param.h):Checklist
libc-test/semverhave been updated*LASTor*MAXare includedcd libc-test && cargo test --target mytarget)@rustbot label +stable-nominated