Skip to content

Conversation

JohnTitor and others added 9 commits October 9, 2025 21:40
(backport rust-lang#4721)

(cherry picked from commit 11f939a)
This commit switches `cfg(target_feature = "p2")` to instead using
`cfg(not(target_feature = "p1"))` to be more future-proof of new Rust
targets such as `wasm32-wasip3`. All future targets will support the
same set of functionality in `wasm32-wasip2`, so this should be valid
for future targets.

(backport rust-lang#4733)

(cherry picked from commit d2fb5b0)
(backport rust-lang#4728)

(cherry picked from commit 4d939b0)
According to
https://man.netbsd.org/confstr.3

_CS_PATH is obsoleted by sysctl (which has a USER_CS_PATH equivalent),
but Linux doesn't have that.

So the simplest thing for applications is to use _CS_PATH which is
part of POSIX. Define, matching the <unistd.h> header.

We could maybe share this definition in src/unix/bsd/netbsdlike/mod.rs,
but I saw that existing definitions are not shared either, so I'm
not sure.

	$ grep src/unix/bsd/netbsdlike -e _PC_LINK_MAX
	src/unix/bsd/netbsdlike/netbsd/mod.rs:1599:11:pub const _PC_LINK_MAX: c_int = 1;
	src/unix/bsd/netbsdlike/openbsd/mod.rs:1193:11:pub const _PC_LINK_MAX: c_int = 1;

Originally reported in fish-shell/fish-shell#11892

(backport rust-lang#4738)

(cherry picked from commit b1be455)
(backport rust-lang#4736)

(cherry picked from commit a7fe341)
(backport rust-lang#4729)

(cherry picked from commit 7062542)
(backport <rust-lang#4719>)
(cherry picked from commit d2ece10)
@rustbot
Copy link
Collaborator

rustbot commented Oct 9, 2025

Some changes occurred in OpenBSD module

cc @semarie

@rustbot
Copy link
Collaborator

rustbot commented Oct 9, 2025

⚠️ Warning ⚠️

  • Pull requests are usually filed against the main branch for this repo, but this one is against libc-0.2. Please double check that you specified the right target!

@JohnTitor JohnTitor changed the title add script to cherry-pick [0.2] Backports Oct 9, 2025
@JohnTitor JohnTitor enabled auto-merge October 9, 2025 12:43
- Add TIOCGETA (0x40487413) for getting termios state
- Add TIOCSETA (0x80487414) for setting termios state immediately
- Add TIOCSETAW (0x80487415) for draining output then setting
- Add TIOCSETAF (0x80487416) for draining output, flushing input, then setting

These constants are present in macOS system headers but were missing
from the libc crate. Fixes issue rust-lang#4735.

(backport <rust-lang#4736>)
(cherry picked from commit 755613e)
@JohnTitor JohnTitor added this pull request to the merge queue Oct 9, 2025
Merged via the queue into rust-lang:libc-0.2 with commit 329a5e7 Oct 9, 2025
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants