-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[0.2] Backports #4595
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
Merged
[0.2] Backports #4595
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
|
[ref](https://smartos.org/man/3C/strftime) [ref](https://docs.oracle.com/cd/E88353_01/html/E37843/strftime-3c.html) Fixes: rust-lang#4449 (backport <rust-lang#4453>) (cherry picked from commit f4964b5)
Enable this lint with the expectation that we will eventually be upgrading editions. There are some exceptions needed, and `unsafe_op_in_unsafe_fn` will take a while to go through. (backport <rust-lang#4585>) (cherry picked from commit 2fe8b17)
Add all constants from bionic's `prctl.h` header https://android.googlesource.com/platform/bionic/+/7ac54f5c391bf3aeb9fec84a158939421fd8f505/libc/kernel/uapi/linux/prctl.h (backport <rust-lang#4531>) (cherry picked from commit eb505fb)
Resolve the `improper_ctypes` warning on l4re-uclibc that we are getting in CI. The current version was added in e412497 ("Move L4Re-specific code into separate module.") and doesn't seem to have been intentional. (backport <rust-lang#4584>) (cherry picked from commit 95c1400)
71ecd63
to
3de256c
Compare
Partial cherry pick of a541bf4 ("libc: remove uses of enum as per rust-lang#4419"). Co-authored-by: mbyx <mbyx.dev@gmail.com>
The enums used on Haiku are currently broken: they have no `repr` attribute so Rust is treating them as a `u8` when they need to be `c_int`. This is flagged by `improper_ctypes`, which only shows up now that this lint got removed. Since this is broken anyway, we may as well just switch to `c_enum!`. This is a user-visible breaking change, but allowed as the target is tier 3. Partially cherry picked from commit a541bf4 ("libc: remove uses of enum as per rust-lang#4419"). Co-authored-by: mbyx <mbyx.dev@gmail.com>
3de256c
to
fddf7df
Compare
Most of what this crate does is interact with C, so the lint should be useful. It can be disabled on a case-by-case basis as needed. There are a few fixes needed for enums, which will be going away anyway (rust-lang#4419). Additionally, switch the `bad_style` lint to the newer name `nonstandard_style`. (backport <rust-lang#4584>) (cherry picked from commit 38bb46e)
(backport <rust-lang#4578>) (cherry picked from commit 925eb0c)
(backport <rust-lang#4588>) (cherry picked from commit bdc4b7d)
(backport <rust-lang#4460>) (cherry picked from commit e7cf1cc)
(backport <rust-lang#4597>) (cherry picked from commit cf82fdf)
Resolve an instance of `improper_ctypes`.
(backport <rust-lang#4608>) (cherry picked from commit e634372)
(backport <rust-lang#4619>) (cherry picked from commit a43bdc3)
RISCV32 is "time64-only" from the beginning on the kernel side. Based on musl change [1] [1] https://git.musl-libc.org/cgit/musl/commit/?id=4bbd7baea7c8538b3fb8e30f7b022a1eee071450 (backport <rust-lang#4612>) (cherry picked from commit 458c5a0)
Version 1.2.5 of musl-libc added support for the statx system call[1]. [1]: https://musl.libc.org/releases.html (backport <rust-lang#3976>) (cherry picked from commit ef3c046)
Haiku implements various parts of the (non-POSIX) BSD API. This moves it to a separate file, for easier future maintenance. No functional change intended; the changes are synchronized with R1Beta5 (backport <rust-lang#4221>) (cherry picked from commit f1091a7)
This includes: * sys/event.h: `kevent()`, `kqueue()`, data structure and constants * sys/iocomm.h: constants that are also defined for other platforms * stdlib.h: `mkstemps()` and `strtonum()` * sys/uov.h: `preadv()` and `pwritev()` * sys/wait.h: `wait4()` (backport <rust-lang#4221>) (cherry picked from commit 7fd1b1a)
For the upstream definition, see: freebsd/freebsd-src@c9e9a0f (backport <rust-lang#4552>) (cherry picked from commit 985d95b)
(backport <rust-lang#4552>) (cherry picked from commit 99e3373)
(backport <rust-lang#4552>) (cherry picked from commit 56a04ab)
<sys/ktls.h> is necessary in order to find the xktls_* structs. See also: freebsd/freebsd-src@c9e9a0f (backport <rust-lang#4552>) (cherry picked from commit 4147a8b)
Upstream commit: freebsd/freebsd-src@7212b37 (backport <rust-lang#4552>) (cherry picked from commit e2404b4)
ref: freebsd/freebsd-src@e570d23#diff-c354fa9fe15a3e5c90079f38792a8e5458d76677437a53ee7537a62fbc72e100R255 (backport <rust-lang#4196>) (cherry picked from commit 0442ebb)
Make it more obvious what this test is about. (backport <rust-lang#4625>) (cherry picked from commit fef089c)
Also start validating formatting in CI for files in `ci/`. (backport <rust-lang#4630>) (cherry picked from commit c0071cc)
fddf7df
to
57fc44a
Compare
Merged
via the queue into
rust-lang:libc-0.2
with commit Aug 11, 2025
94a7f32
46 of 50 checks passed
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:
rust_2024_compatibility
lint #4585improper_ctypes
#4584main
toctest
#4625