-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[0.2] Backports #4856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tgross35
merged 24 commits into
rust-lang:libc-0.2
from
tgross35:backport-black-eyed-peas
Dec 2, 2025
Merged
[0.2] Backports #4856
tgross35
merged 24 commits into
rust-lang:libc-0.2
from
tgross35:backport-black-eyed-peas
Dec 2, 2025
Conversation
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
(backport <rust-lang#4609>) (cherry picked from commit cbc178b)
(backport <rust-lang#4609>) (cherry picked from commit c4dcfd2)
Move `pthread_*` API in `linux_like/linux.rs` to a module in `new` and reexport via `glibc` and `musl`. Eventually other platforms will be ported as well. (backport <rust-lang#4833>) (cherry picked from commit 04c5805)
These jobs almost always fail with a segfault so unfortunately aren't very useful. There isn't anything we can do to fix them on the libc side, given the issue comes from a kernel bug. The failing jobs have been a source of contributor confusion, so remove them here. Link: rust-lang#4740 Link: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285873 (backport <rust-lang#4838>) (cherry picked from commit 7b1449a)
(backport <rust-lang#4834>) (cherry picked from commit af044aa)
(backport <rust-lang#4834>) (cherry picked from commit 6029abb)
(backport <rust-lang#4836>) (cherry picked from commit bed5b8d)
This is imperfect but should get things closer to what is available on l4re's uclibc fork. Based on work by Marius Melzer [rust-lang#4479]. [rust-lang#4479]: rust-lang#4479 (backport <rust-lang#4836>) (cherry picked from commit 34d8ce7)
We will eventually add `libpthread`, so accommodate for that. (backport <rust-lang#4840>) (cherry picked from commit 4e698ae)
(backport <rust-lang#4839>) (cherry picked from commit dc66e54)
364f6a0 to
274bfa8
Compare
Collaborator
|
12394c7 to
0eca029
Compare
This sets up the basic structure but does not yet move all `pthread_*` API. (backport <rust-lang#4839>) (cherry picked from commit ce5dc81)
It isn't worth keeping a separate rustfmt.toml only for ctest, so switch to using the vertical formatting everywhere. (backport <rust-lang#4842>) (cherry picked from commit 04ab55d)
We need a bit more flexibility in the formatting, which would be difficult to achieve with bash. Rewrite the style check to a python script that will be easier to extend. This is also faster than using inplace perl, an now prints a diff when semver files aren't sorted. (backport <rust-lang#4842>) (cherry picked from commit 9713fd1)
Accept a visibility so we are able to make some variants nonpublic. This means that `pub` needs to be added on all variants we want to be visible: it is more verbose, but matches how everything else works. (backport <rust-lang#4841>) (cherry picked from commit ba6357e) [ Needed to drop changes to a lot of types that still use Rust `enum`s - Trevor ]
E.g. the following can now be formatted correctly:
c_enum! {
#[repr(c_uint)]
pub enum #anon {
pub PTHREAD_INTROSPECTION_THREAD_CREATE = 1,
pub PTHREAD_INTROSPECTION_THREAD_START,
pub PTHREAD_INTROSPECTION_THREAD_TERMINATE,
pub PTHREAD_INTROSPECTION_THREAD_DESTROY,
}
}
(backport <rust-lang#4841>)
(cherry picked from commit d58c1f4)
(backport <rust-lang#4827>) (cherry picked from commit eb871eb)
These constants and functions are required for building uutils-coreutils for Cygwin. Sources: https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/cygwin/config.h#L50 https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/newlib/libc/include/stdio.h#L138-L139 https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/cygwin/utmp.h#L20-L33 https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/utmpx.h#L21-L32 https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/newlib/libc/include/stdio.h#L120-L122 https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/newlib/libc/include/grp.h#L64-L65 https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/utmpx.h#L21-L32 https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/utmpx.h#L42-L49 (backport <rust-lang#4827>) (cherry picked from commit a3bb40e)
(backport <rust-lang#4830>) (cherry picked from commit 3ff2a88)
Like FreeBSD but unlike OpenBSD, NetBSD supports eventfd since version 10 (September 2021, see http://netbsd.org/changes/changes-10.0.html). I don't know enough about NetBSD to know whether all systems running 10 can be expected to have eventfd, but it's probably fine. Our GitHub actions CI only tests NetBSD 10.1. Ref: https://man.netbsd.org/eventfd.2 Ref: https://github.com/NetBSD/src/blob/d04b0c735abc997743bb3faa74464524cbe7becd/sys/sys/eventfd.h (backport <rust-lang#4830>) (cherry picked from commit 3e82c57)
This is defined in termios-c_iflag.h (or termbits.h) and it's shared across all the linux archs, even though it's not POSIX (backport <rust-lang#4846>) (cherry picked from commit fb8c00e)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> (backport <rust-lang#4848>) (cherry picked from commit 71e04e1)
(backport <rust-lang#4850>) (cherry picked from commit b841a78)
0eca029 to
589ecc1
Compare
Fixes: 8ff5e7e ("NetBSD: Increase the size of sockaddr_dl.sdl_data from 12 to 24") (backport <rust-lang#4855>) (cherry picked from commit 4684598)
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.
Backport the following:
Paddingnewtype #4609newmodule #4833newmodule #4834apple/module #4840newmodule #4839c_enumvariants #4841utmp/x.h,grp.h, andstdio.hinterfaces #4827sockaddr_dlon NetBSD9 #4855