Skip to content

Conversation

This is a cherry pick of 1b08efd ("Increase the recursion limit to
fix docs.rs `ctest`") but we don't need the ctest bit, only the docs
build.

So, in essence:
(backport <rust-lang#4371>)
(cherry picked from commit 1b08efd)
This was part of e09683e ("run clippy on 3 major platforms"), most
of which made it to libc-0.2. However, this line was missed.
The x86-64 NetBSD target is tier 2, so we can start testing it.

(backport <rust-lang#4782>)
(cherry picked from commit d77b8e7)
This is not always present when we are building as `rustc-dep-of-std`.

(backport <rust-lang#4782>)
(cherry picked from commit 919d0d4)
This pattern is currently used by the `freebsd-version` check but will
be used by more in the future.

(backport <rust-lang#4782>)
(cherry picked from commit 91f208c)
Some of these may have been removed. `NI_MAXHOST` is already specified
in the unix semver file.

(backport <rust-lang#4782>)
(cherry picked from commit 60d7ccc)
Create a new module for `utmpx` and move definitions there, then correct
`_UTX_PADSIZE`. We can also just use `s!`, there is no need to manually
implement the traits.

NetBSD defines `_UTX_PADSIZE` manually but includes this comment in
their source:

    /*
     * This should be:
     * 40 - (sizeof(struct timeval) - sizeof(struct { long s; long u; })))
     * but g++ does not like it, to retain size compatibility with v1.00,
     * so we do it manually.
     */
    #ifdef _LP64
    #define _UTX_PADSIZE 36
    #else
    #define _UTX_PADSIZE 40
    #endif

I tried using the expression here:

    40 - (size_of::<crate::timeval>() - size_of::<(c_long, c_long)>());

But this returns a value of 8 which doesn't match the expected 36. So,
keep with their source and hardcode the values.

Link: https://github.com/NetBSD/src/blob/6ace5fed3bd010695a1b88ca6c1f8a5af7793ffb/include/utmpx.h#L91-L101

(backport <rust-lang#4782>)
(cherry picked from commit 4055637)
This is currently defined as an `unsigned int` but should be `int32_t`.
Also move some related definitions `new`.

Link: https://github.com/NetBSD/src/blob/6ace5fed3bd010695a1b88ca6c1f8a5af7793ffb/sys/sys/types.h#L200

(backport <rust-lang#4782>)
(cherry picked from commit 2946483)
Move `timex.h` types to the `new/` module.

(backport <rust-lang#4782>)
(cherry picked from commit fb74b6f)
The definition of `struct ifreq` didn't match up. Make a new module for
`net/if.h` and fix it there. Note that this drops some trait
implementations since the correct API involves unions.

(backport <rust-lang#4782>)
(cherry picked from commit 8cb1db9)
Relevant source:

* `devname`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/include/stdlib.h#L296
* `getutent`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/include/utmp.h#L70
* `ntp_gettime`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/sys/sys/timex.h#L257
* `sched_rr_get_interval`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/include/sched.h#L50-L51
* `shmctl`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/sys/sys/shm.h#L2011
* `sig{action,suspend}`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/include/signal.h#L85-L95
* `{get,set}itimer`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/sys/sys/time.h#L331-L335
* `timer_{get,set}time`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/include/time.h#L158-L160
* `utmpx` symbols: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/include/utmpx.h#L135-L150
* `wait4`: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/sys/sys/wait.h#L209

Excluded are `__statvfs90`, `__fstatvfs90`, `__sigaction_siginfo`,
`__getmntinfo90`, `__getvfsstat90`which are only present in 10.0+ (the
symbol version seems to be N-1). Source:

* https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/sys/sys/statvfs.h#L160-L168

There is also a deprecated aliases that used to be needed and is removed
here.

* `__getmntinfo13`:  https://github.com/NetBSD/src/blob/62c785e59d064070166dab5d2a4492055effba89/lib/libc/compat/gen/compat___getmntinfo13.c#L49-L50

(backport <rust-lang#4782>)
(cherry picked from commit 1816f60)
tgross35 and others added 2 commits December 2, 2025 02:36
This API is only available in WASIp1 and as the libc build for WASIp2 is
changing the symbol was recently deleted. This functionality makes sense
for WASIp1, but for WASIp2 it's a fundamentally different set of
syscalls so this is no longer provided by libc.

(backport <rust-lang#4837>)
(cherry picked from commit ca20d7d)
jackpot51 and others added 3 commits December 2, 2025 02:39
(backport <rust-lang#4825>)
(cherry picked from commit 33c96c9)
Bumps [vmactions/solaris-vm](https://github.com/vmactions/solaris-vm) from 1.1.5 to 1.1.6.
- [Release notes](https://github.com/vmactions/solaris-vm/releases)
- [Commits](vmactions/solaris-vm@v1.1.5...v1.1.6)

---
updated-dependencies:
- dependency-name: vmactions/solaris-vm
  dependency-version: 1.1.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

(backport <rust-lang#4826>)
(cherry picked from commit 7b336ae)
* Update to wasi-sdk-29 which is the latest
* Pass `-Clink-self-contained=n` instead of
  `-Ctarget-feature=-crt-static` (which didn't work) to force using the
  external libc.

(backport <rust-lang#4837>)
(cherry picked from commit 6259f3a)
@tgross35 tgross35 marked this pull request as ready for review December 2, 2025 07:50
@rustbot
Copy link
Collaborator

rustbot commented Dec 2, 2025

Some changes occurred in OpenBSD module

cc @semarie

Some changes occurred in the Android module

cc @maurer

Some changes occurred in solarish module

cc @jclulow, @pfmooney

@rustbot
Copy link
Collaborator

rustbot commented Dec 2, 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!

@tgross35 tgross35 enabled auto-merge December 2, 2025 07:50
@tgross35 tgross35 added this pull request to the merge queue Dec 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 2, 2025
@tgross35 tgross35 added this pull request to the merge queue Dec 2, 2025
Merged via the queue into rust-lang:libc-0.2 with commit db87685 Dec 2, 2025
51 checks passed
@tgross35 tgross35 deleted the backport-mung branch December 2, 2025 19:30
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.

4 participants