Skip to content

Conversation

neuschaefer
Copy link
Contributor

Description

During the development of FreeBSD 15, a field was added to kinfo_proc. With this PR and #4552, the libc-test suite passes on FreeBSD 15 on ppc64.

Sources

Upstream commit: freebsd/freebsd-src@7212b37

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@tgross35
Copy link
Contributor

@asomers given this does technically break the struct definition, do you want this on stable? I think if this is done, the struct should be marked #[non_exhaustive] at the same time so future similar changes aren't breaking (in 1.0 everything will be #[non_exhaustive]).

The change itself LGTM

@asomers
Copy link
Contributor

asomers commented Jul 28, 2025

This change only affects FreeBSD 15. That release is still under development, and therefore no backwards-compatibility concerns apply. So yes I think we should merge it to libc-0.2.

@tgross35
Copy link
Contributor

Thanks for confirming, that's perfect. I think we should still add #[non_exhaustive] to allow changing padding fields into named fields in the future.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

could you just make the struct #[non_exhaustive]? We're starting to do this for everything new, may as well do it with the change here as well

struct kinfo_proc may be extended again in the future.
Add #[non_exhaustive] to let the compiler and other tooling know.
@neuschaefer
Copy link
Contributor Author

could you just make the struct #[non_exhaustive]? We're starting to do this for everything new, may as well do it with the change here as well

commit added.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Thank you!

@tgross35 tgross35 added this pull request to the merge queue Aug 11, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 11, 2025
@tgross35 tgross35 added this pull request to the merge queue Aug 11, 2025
Merged via the queue into rust-lang:main with commit 9ee2d2a Aug 11, 2025
48 of 52 checks passed
@neuschaefer neuschaefer deleted the freebsd-kinfo branch August 11, 2025 22:14
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Sep 19, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 19, 2025
struct kinfo_proc may be extended again in the future.
Add #[non_exhaustive] to let the compiler and other tooling know.

(backport <rust-lang#4553>)
(cherry picked from commit 9ee2d2a)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 19, 2025
struct kinfo_proc may be extended again in the future.
Add #[non_exhaustive] to let the compiler and other tooling know.

(backport <rust-lang#4553>)
(cherry picked from commit 9ee2d2a)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 19, 2025
struct kinfo_proc may be extended again in the future.
Add #[non_exhaustive] to let the compiler and other tooling know.

(backport <rust-lang#4553>)
(cherry picked from commit 9ee2d2a)
@tgross35 tgross35 mentioned this pull request Sep 19, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 19, 2025
struct kinfo_proc may be extended again in the future.
Add #[non_exhaustive] to let the compiler and other tooling know.

(backport <#4553>)
(cherry picked from commit 9ee2d2a)
github-merge-queue bot pushed a commit that referenced this pull request Sep 19, 2025
struct kinfo_proc may be extended again in the future.
Add #[non_exhaustive] to let the compiler and other tooling know.

(backport <#4553>)
(cherry picked from commit 9ee2d2a)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-unix stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants