Skip to content
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

[0.2] Backports #4314

Merged
merged 23 commits into from
Mar 10, 2025
Merged

[0.2] Backports #4314

merged 23 commits into from
Mar 10, 2025

Conversation

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2025

@tgross35: no appropriate reviewer found, use r? to override

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2025

Some changes occurred in OpenBSD module

cc @semarie

Some changes occurred in OpenBSD module

cc @semarie

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Some changes occurred in the Android module

cc @maurer

arctic-alpaca and others added 5 commits March 10, 2025 09:11
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

(backport <rust-lang#4222>)
(cherry picked from commit ec9ea22)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

(backport <rust-lang#4222>)
(cherry picked from commit cb668df)
(backport <rust-lang#4235>)
(cherry picked from commit d1d9c2b)
Removed `pthread_set_name_np` function from the NuttX bindings as it does not exist in the NuttX API,
this change aligns the code with the actual NuttX implementation

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

(backport <rust-lang#4251>)
(cherry picked from commit f4ab0b1)
lvllvl and others added 7 commits March 10, 2025 09:18
(backport <rust-lang#4236>)
(cherry picked from commit 67d2ead)
sockaddr_ll/AF_PACKET are in place since Linux 2.2

(backport <rust-lang#4267>)
(cherry picked from commit eb78ad0)
(backport <rust-lang#4234>)
(cherry picked from commit 5096e10)
Just a simple copy, no cfg conditionals have been removed.  This makes
it easier to review this commit.

(backport <rust-lang#4276>)
(cherry picked from commit 6653298)
Now that mips has its own copy of struct stat, remove all the cfg
conditionals used to handle the difference between mips and everything
else.

Future support for _FILE_OFFSET_BITS=64 and _TIME_BITS=64 will be much
easier when the mips differences does not have to be handled in the
same conditionals.

(backport <rust-lang#4276>)
(cherry picked from commit a092eed)
(backport <rust-lang#4232>)
(cherry picked from commit ccf7b41)
lvllvl and others added 11 commits March 10, 2025 09:18
(backport <rust-lang#4231>)
(cherry picked from commit 861246a)
(backport <rust-lang#4285>)
(cherry picked from commit d27a284)
These socket options are currently defined only on macOS and friends,
but they exist on illumos and Solaris as well.

This commit defines these socket options on solarish operating systems.

On Solaris, see the man page [`ip(7P)`].

I'd like to provide a link to the illumos manual pages, but apparently
https://illumos.org/man seems to be impacted by today's AWS outage.

The constants are defined in `/usr/include/netinet/in.h`:

```console
eliza@atrium ~ $ uname -a
SunOS atrium 5.11 helios-2.0.22827 i86pc i386 i86pc
eliza@atrium ~ $ rg 'IP(V6)?_BOUND_IF' /usr/include
/usr/include/netinet/in.h
978:#define   IP_BOUND_IF                0x41    /* bind socket to an ifindex       */
1311:#define  IPV6_BOUND_IF              0x41    /* bind to an ifindex */
```

[`ip(7P)`]: https://docs.oracle.com/cd/E86824_01/html/E54777/ip-7p.html

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

(backport <rust-lang#4287>)
(cherry picked from commit 885148d)
NetBSD, OpenBSD and DragonFly return c_int, FreeBSD returns void,
so we can't just add it in freebsdlike.
Apple doesn't seem to support closefrom at all at this point.

(backport <rust-lang#4290>)
(cherry picked from commit 8512ab4)
(backport <rust-lang#4286>)
(cherry picked from commit f84f618)
See arch/mips/include/uapi/asm/siginfo.h

(backport <rust-lang#4292>)
(cherry picked from commit 1f8474e)
`ctest` is iffy about whether or not it accepts `..=` syntax, and I
can't figure out what makes it decide whether or not to accept it and
sometimes random changes seem to make things fail, so just replace the
syntax.

This is simpler anyway, and closer matches the upstream definition [1].

Link: https://github.com/torvalds/linux/blob/80e54e84911a923c40d7bee33a34c1b4be148d7a/Makefile#L1316 [1]

(backport <rust-lang#4311>)
(cherry picked from commit 1779f14)
Since [1], this target no longer exists so we need to remove it from CI.

[1]: rust-lang/rust#137957

(backport <rust-lang#4311>)
(cherry picked from commit 33c320a)
check-cfg was stabilized in 1.80, so there is no longer any need to have
a specific job and environment variable to enable it only under certain
conditions.

(backport <rust-lang#4312>)
(cherry picked from commit 2065a4a)
@tgross35 tgross35 enabled auto-merge March 10, 2025 09:22
@tgross35 tgross35 added this pull request to the merge queue Mar 10, 2025
@tgross35 tgross35 mentioned this pull request Mar 10, 2025
Merged via the queue into rust-lang:libc-0.2 with commit 7ac4575 Mar 10, 2025
43 checks passed
@tgross35 tgross35 deleted the backport-cremini branch March 10, 2025 09:57
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.