Skip to content

AIX: change BPF_ALIGNMENT to usize - #5373

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
xingxue-ibm:aix-fix-BPF_ALIGNMENT
Aug 5, 2026
Merged

AIX: change BPF_ALIGNMENT to usize#5373
tgross35 merged 1 commit into
rust-lang:mainfrom
xingxue-ibm:aix-fix-BPF_ALIGNMENT

Conversation

@xingxue-ibm

Copy link
Copy Markdown
Contributor

Description

AIX header net/bpf.h defines BPF_ALIGNMENT as sizeof(int) which is size_t instead of c_ulong.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • Commit messages permalink to headers for added or changed API
  • Placeholder or unstable values like *LAST or *MAX have the standard
    doc comment
  • Tested locally (cargo test -p libc-test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot rustbot added O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 5, 2026
@xtqqczze

xtqqczze commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

AIX header net/bpf.h

@xingxue-ibm We usually include permalinks to headers in commit messages for API changes, but I guess AIX headers are not publicly available?

@xingxue-ibm

Copy link
Copy Markdown
Contributor Author

AIX header net/bpf.h

@xingxue-ibm We usually include permalinks to headers in commit messages for API changes, but I guess AIX headers are not publicly available?

Right, unfortunately IBM does not publish a complete, browsable full-text repository of all AIX system header files directly online. Below is the relevant definition from the AIX net/bpf.h.

 ...
 86 #ifndef _H_BPF
 87 #define _H_BPF
 88 #define BPF_ALIGNMENT sizeof(int)
 ...

Comment thread src/unix/aix/mod.rs Outdated
Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a squash, thanks!

View changes since this review

@xingxue-ibm
xingxue-ibm force-pushed the aix-fix-BPF_ALIGNMENT branch from 450a2c2 to d4c879b Compare August 5, 2026 18:16
@tgross35
tgross35 enabled auto-merge August 5, 2026 18:19
@tgross35
tgross35 added this pull request to the merge queue Aug 5, 2026
Merged via the queue into rust-lang:main with commit 15d38f7 Aug 5, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-unix stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants