Skip to content

[0.2] Backports - #5462

Merged
tgross35 merged 88 commits into
rust-lang:libc-0.2from
tgross35:backport-purple-majesty
Sep 4, 2026
Merged

[0.2] Backports#5462
tgross35 merged 88 commits into
rust-lang:libc-0.2from
tgross35:backport-purple-majesty

Conversation

@tgross35

@tgross35 tgross35 commented Sep 4, 2026

Copy link
Copy Markdown
Member

Backport the following:

japaric and others added 30 commits September 4, 2026 01:08
these are changes required to pass `cargo test -p libc-test --test ctest` on
the QNX targets

libc-test had probably not been run before for QNX8 so quite a few things needed
fixing:
- some constants that were present in QNX7.1 are no longer present in QNX8, e.g.
  `STATE_STACK`, `_NTO_CI_SANDBOX`
- the values of some constants have changed on QNX8, e.g. `FILENAME_MAX`
- some functions that were present in QNX7.1 are no longer present in QNX8, e.g
  `SyncMutexRevive`
- some structs have changed ABI in QNX8, e.g. `_thread_attr`, `mallinfo`,
  `pthread_rwlock_t`
- on QNX8, `inotify_*` functions now live in the `libfsnotify.so` library
- on QNX8, the neutrino API is specified in `sys/neutrino.h`
- some header files (e.g. `sys/malloc.h`, `nbutil.h`) are no longer present on
  QNX8

libc-test probably had not been run in a while for QNX7.1 so there a few
small fixes there as well:

- `ctest` v0.5.x requires that bindings have named arguments but `sysctl` was
  using underscores (`_`) as names; the arguments now have names
- `BPF_{MOD,XOR}` are only defined in `pcap/bpf.h` but the header file cannot
  be included together with `net/bpf.h` due to `ifdef` include guards on the
  C side and `ctest` only generating a single test binary. These constants
  can't be tested by `ctest` on QNX7.1, so they have been added to the
  skip list
- `ctest` does not support anonymous unions so the `ifr_ifru` field in the
  `ifreq` struct needs to be skipped
- the `timezone` struct must be skipped as it's an `extern_ty!`pe

(backport <rust-lang#5337>)
(cherry picked from commit 8568742)
these are based on `unix.txt` without the API not present on QNX

note that `qnx.txt` has extra API that is not present in
`nto.txt`, like `SA_ONSTACK` and `cfsetspeed`

with this change the entirity of `libc-test`'s tests pass on QNX targets

(backport <rust-lang#5337>)
(cherry picked from commit e27c7f1)
Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>

(backport <rust-lang#5373>)
(cherry picked from commit 15d38f7)
Move OpenBSD HW_* sysctl constants into sys/sysctl.rs and add some
missing definitions from sys/sysctl.h.

Ref: https://github.com/openbsd/src/blob/544119925528153b873297bc630370abacfd5a7f/sys/sys/sysctl.h

(backport <rust-lang#5371>)
(cherry picked from commit d0c9b0f)
This effectively adds the constant for musl too, as the last platform to
support this symbol.

It has been supported in musl since

  7c71792e ("add support for SIGEV_THREAD_ID timers")

and was released with v1.2.2 in January 2021.

The libc-test build script needed some tweaking to skip the symbol when
building against an older musl.

Also double-checked that the `sigevent` struct is defined in the exact
same way.

Signed-off-by: Christoph Heiss <christoph@c8h4.io>

Co-authored-by: Christoph Heiss <christoph@c8h4.io>

(backport <rust-lang#5375>)
(cherry picked from commit 74e58cc)
Add comment annotations to certain LFS bindings that need deprecation
and eventual removal only under certain targets. This is due to the fact
they are only considered equivalent when the target is either 32-bits or
64-bits. This applies to `statfs`, `statvfs` and routines that depend on
them. See `sys/statfs.h`, `sys/statvfs.h` under `/usr/include` in any
AIX 7.3 machine.

(backport <rust-lang#5382>)
(cherry picked from commit ee82420)
Add comments for deprecation once stage 3 of the 64-bit plan is reached
[^1].

[^1]: rust-lang#4805

(backport <rust-lang#5382>)
(cherry picked from commit 8bfbef5)
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](vmactions/freebsd-vm@77ed28d...83b151f)

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

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

(backport <rust-lang#5398>)
(cherry picked from commit 8a5f2d5)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.9.1 to 2.9.2.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](Swatinem/rust-cache@c193711...6323deb)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-version: 2.9.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

(backport <rust-lang#5394>)
(cherry picked from commit b52d93f)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.85.5 to 2.85.10.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](taiki-e/install-action@6a1bd70...6c6fd71)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.85.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

(backport <rust-lang#5395>)
(cherry picked from commit f9189d5)
Bumps [vmactions/netbsd-vm](https://github.com/vmactions/netbsd-vm) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/vmactions/netbsd-vm/releases)
- [Commits](vmactions/netbsd-vm@e7ac71b...00081e8)

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

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

(backport <rust-lang#5396>)
(cherry picked from commit aa39754)
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](zizmorcore/zizmor-action@6fc4b00...3dc1ecc)

---
updated-dependencies:
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

(backport <rust-lang#5397>)
(cherry picked from commit 5d91b82)
emscripten follows musl quite closely. The changes they make are not
concerned with file offset types. The only exception to this is
`blkcnt_t`. This type is defined as 32-bits wide no matter the target.

All other file offset types are 64-bit wide no matter the target.

(backport <rust-lang#5142>)
(cherry picked from commit 036d31d)
Android had LFS bindings. This is not necessary. Targets with 32-bit
ABIs have it upstream. Targets with 64-bit ABIs don't.

This patch annotates them for future deprecation in the plan outlined in
rust-lang#4805. This only applies to targets with 64-bit ABIs.

(backport <rust-lang#5178>)
(cherry picked from commit 5b25cab)
1.2.0 was the release that introduced 64-bit `time_t` everywhere [1],
which is the main thing we are interested in with this config. There is
nothing special about 1.2.3, and most gated API will work down to 1.2.0.
This has been a source of mild confusion.

To make things more clear, drop the `_3`. We continue to support
`libc_unstable_musl_v1_2_3` for now but emit a warning if set.

Closes: rust-lang#5200

[1]: https://musl.libc.org/releases.html

[ basically readid the same change for the backport rather than
  resolving conflicts - Trevor ]

(backport <rust-lang#5376>)
(cherry picked from commit 01a116f)
(backport <rust-lang#5376>)
(cherry picked from commit 111660a)
On LP32 `dev_t`, `ino_t`, `off_t` and `blkcnt_t` are 32-bit while
`__STAT64_BODY` uses wider fields, so keep bionic's layout and only use
`time_t`, which does match. Bionic declares `stat` and `stat64` with the
same macro, so make `stat64` an alias.

(backport <rust-lang#3286>)
(cherry picked from commit 0f136e8)
This change adds the following system calls to various 4.4BSD
derivatives:

* FreeBSD(-like)
    * lchmod ([DragonFlyBSD][1], [FreeBSD][2])
* macOS
    * [lchflags][3]
    * [lchmod][4]
* NetBSD
    * [lchmod][5]

These system calls are available on all ancient versions of *BSD
(4.4BSD, FreeBSD 3.0, etc). More specific historical information
about when the functions were added is available in the manpages
and headers referenced.

This change also adds *chflags and *chmod to macos' semver file
(additional syscalls are missing from that file).

1: https://leaf.dragonflybsd.org/cgi/web-man?command=lchmod
2: https://man.freebsd.org/cgi/man.cgi?query=lchmod
3: https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/stat.h#L597
4: https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/stat.h#L598
5: https://man.netbsd.org/lchmod.2

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>

(backport <rust-lang#5400>)
(cherry picked from commit 8b4ebdc)
libc already has `struct statx` fields through 6.16 but there are
missing masks, so several fields are exposed with no way to request
them. Add the five constants the header defines and libc does not.

The NDK doesn't have `STATX_DIO_READ_ALIGN` yet, so left out for
Android. Three others landed in r28 and CI still runs r27, so they're
skipped in `test_android`.

Link: https://github.com/torvalds/linux/blob/8cd9520d35a6c38db6567e97dd93b1f11f185dc6/include/uapi/linux/stat.h#L218-L221
Link: https://github.com/torvalds/linux/blob/8cd9520d35a6c38db6567e97dd93b1f11f185dc6/include/uapi/linux/stat.h#L257
Link: https://android.googlesource.com/platform/bionic/+/a63b21091ada240d92f8ceadb1cabbdedaaab81b/libc/kernel/uapi/linux/stat.h#95
Link: https://man7.org/linux/man-pages/man2/statx.2.html

(backport <rust-lang#5412>)
(cherry picked from commit 0ddf5b7)
We now have forking-renovate set up [1].

[1]: rust-lang#5419

(backport <rust-lang#5423>)
(cherry picked from commit c1dcff0)
skrap and others added 19 commits September 4, 2026 06:41
RTEMS was using the generic ARM socket address layout, which does not
match its FreeBSD-derived socket API. As a result, std could not parse
addresses returned by local_addr, accept, and recv_from.

Use the correct RTEMS socket address definitions and update 27 constants
to their FreeBSD values.

Header sources (newlib as built by the RTEMS 6 RSB,
gitlab.rtems.org/contrib/newlib-cygwin @ 1b3dcfdc6f1f):

https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/socket.h#L322
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/netinet/in.h#L98
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/netinet6/in6.h#L121
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/un.h#L58
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/_sockaddr_storage.h#L41-53

https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/socket.h#L246
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/netinet/in.h#L424
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/netinet/tcp.h#L168
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/poll.h#L65
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/filio.h#L50
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/_termios.h#L78
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/netdb.h#L156
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/_default_fcntl.h#L63
https://gitlab.rtems.org/contrib/newlib-cygwin/-/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/select.h#L34

(backport <rust-lang#5313>)
(cherry picked from commit b6d2732)
Avoid PRs such as [1] changing numbered tags to a codename and date.

[1]: rust-lang#5428

(backport <rust-lang#5452>)
(cherry picked from commit 8bb320d)
RTEMS's newlib defines these in <machine/_types.h>: __dev_t, __ino_t
and _CLOCK_T_ as __uint64_t, __rlim_t as __int64_t, _CLOCKID_T_ as int
— where this tree has them 32-bit, and clockid_t unsigned. Verified
with _Static_assert under both arm-rtems6-gcc and arm-rtems7-gcc.

Source: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/7d4336cf6e519c2a4c9baac10da7a785d88d30c5/newlib/libc/sys/rtems/include/machine/_types.h#L12-L39

(backport <rust-lang#5450>)
(cherry picked from commit 7c1cc59)
The layout of slices is currently not specified in Rust. This PR
replaces a `transmute` between slices of different types with the
equivalent pointer cast to keep all involved behaviour specified.

(backport <rust-lang#5440>)
(cherry picked from commit 86216b9)
IIUC, they were not added as part of
rust-lang#2639 because Musl kernel headers
were too old.

(backport <rust-lang#5453>)
(cherry picked from commit 4db6d73)
Replace the types of private padding fields with our custom `Padding`
type. This has been in use for some time, but there are still remnants
left from before the `Padding` type was a thing.

(backport <rust-lang#5435>)
(cherry picked from commit 7aa1dbc)
Replace types of padding fields that were deprecated for the `Padding`
type. The deprecation warnings have been there for more than 6 years, so
it's fine to act on them now.

Make afore-mentioned padding fields private.

(backport <rust-lang#5435>)
(cherry picked from commit 31e8e55)
Corrected `siginfo_t` to match relibc:
- [siginfo struct](https://gitlab.redox-os.org/redox-os/relibc/-/blob/f1772c4bb829e02742275e655d349dda02b27cec/src/header/signal/mod.rs#L152) (siginfo_t struct in libc)
- [siginfo_t pub type pointing to siginfo](https://gitlab.redox-os.org/redox-os/relibc/-/blob/f1772c4bb829e02742275e655d349dda02b27cec/src/header/signal/mod.rs#L185)

Added the following items:
- [sigaltstack struct](https://gitlab.redox-os.org/redox-os/relibc/-/blob/f1772c4bb829e02742275e655d349dda02b27cec/src/header/signal/mod.rs#L99) (stack_t struct in libc)
- [stack_t pub type pointing to sigaltstack struct](https://gitlab.redox-os.org/redox-os/relibc/-/blob/f1772c4bb829e02742275e655d349dda02b27cec/src/header/signal/mod.rs#L188)
- [sigaltstack function](https://gitlab.redox-os.org/redox-os/relibc/-/blob/f1772c4bb829e02742275e655d349dda02b27cec/src/header/signal/mod.rs#L346)
- [SS_ONSTACK constant](https://gitlab.redox-os.org/redox-os/relibc/-/blob/f1772c4bb829e02742275e655d349dda02b27cec/src/header/signal/constants.rs#L131)
- [SS_DISABLE constant](https://gitlab.redox-os.org/redox-os/relibc/-/blob/f1772c4bb829e02742275e655d349dda02b27cec/src/header/signal/constants.rs#L133)
- [pid_t type](https://gitlab.redox-os.org/redox-os/relibc/-/blob/f1772c4bb829e02742275e655d349dda02b27cec/src/header/bits_pid-t/mod.rs#L5)

These changes, when released in a stable 0.2.x release, will allow us to use upstream libc for compiling wasmtime natively on Redox.

Edited to add the following:
- [ucontext struct](https://gitlab.redox-os.org/redox-os/relibc/-/blob/e596d08aeaf43f90b18b961c1155d1c1e3eea416/src/header/signal/redox.rs#L48)
- [ucontext_t pub type pointing to ucontext](https://gitlab.redox-os.org/redox-os/relibc/-/blob/e596d08aeaf43f90b18b961c1155d1c1e3eea416/src/header/signal/redox.rs#L42)
- [mcontext struct x86_64](https://gitlab.redox-os.org/redox-os/relibc/-/blob/e596d08aeaf43f90b18b961c1155d1c1e3eea416/src/header/signal/redox.rs#L82)
- [mcontext struct x86](https://gitlab.redox-os.org/redox-os/relibc/-/blob/e596d08aeaf43f90b18b961c1155d1c1e3eea416/src/header/signal/redox.rs#L74)
- [mcontext struct aarch64](https://gitlab.redox-os.org/redox-os/relibc/-/blob/e596d08aeaf43f90b18b961c1155d1c1e3eea416/src/header/signal/redox.rs#L107)
- [mcontext struct riscv64](https://gitlab.redox-os.org/redox-os/relibc/-/blob/e596d08aeaf43f90b18b961c1155d1c1e3eea416/src/header/signal/redox.rs#L113)
- [mcontext_t pub type pointing to mcontext struct](https://gitlab.redox-os.org/redox-os/relibc/-/blob/e596d08aeaf43f90b18b961c1155d1c1e3eea416/src/header/signal/redox.rs#L44)

(backport <rust-lang#5436>)
(cherry picked from commit a5b9638)
(backport <rust-lang#5436>)
(cherry picked from commit 96b7867)
(backport <rust-lang#5460>)
(cherry picked from commit 0413143)
Replace references to `siginfo_t` in the regular repository layout with
a crate-relative path that uses the reexport from the `new` module. This
allows the next few patches to all work as individual revisions.

(backport <rust-lang#5345>)
(cherry picked from commit aa478e6)
Replace alignment/padding fields with a one-to-one definition as that
used upstream. These have been incorporated as definitions in the `new`
module to avoid huge repetition across target triples without overrides.
The glibc definitions are mostly the same across target architectures
except for MIPS, SPARC and x86. x86 is confusing because there's only an
override when running under x86_64 and compiling for x32. I'm not sure
how Rust handles this, so the `#[path]`-redirected files for that
architecture are the same as the generic ones. See [^1] for the generic
file and the following list for the architecture-specific overrides.

- `mips`:
<https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/sysdeps/unix/sysv/linux/mips/bits/siginfo-arch.h>
- `sparc`:
<https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h>
- `x86`:
<https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h>

[^1]:
<https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/sysdeps/unix/sysv/linux/bits/types/siginfo_t.h>

(backport <rust-lang#5345>)
(cherry picked from commit 4b355bd)
[ Needed to adjust the body of si_int for the cherry pick since on
  libc-0.2, sigval is still a struct - Trevor ]
Remove older bindings to `siginfo_t` using dummy fields instead of the
upstream `union`. This follows from the patch providing a full
definition for glibc bindings.

Add reexports for `siginfo_t` under the `new` module. This has required
renaming the reexport for the `nptl` module as it also contains a `bits`
module of the same name as the `bits::types::siginfo_t` module path
under `sysdeps`.

(backport <rust-lang#5345>)
(cherry picked from commit 404da0e)
Replace alignment/padding fields with a mirrored definition of the
upstream `union`. See [^1] for details.

[^1]: <https://github.com/kraj/musl/blob/a42e9dee266f398026a33d0793c66225c7997755/include/signal.h>

(backport <rust-lang#5345>)
(cherry picked from commit 5bea5fb)
[ Needed to adjust the body of si_int for the cherry pick since on
  libc-0.2, sigval is still a struct - Trevor ]
Remove older bindings to `siginfo_t` using dummy fields instead of the
upstream `union`. This follows from the patch providing a full
definition for musl bindings.

Add modified bindings under `new`.

(backport <rust-lang#5345>)
(cherry picked from commit 539ecdd)
Replace alignment/padding dummy fields with a mirrored definition
fitting that of upstream's `union`. uClibc supports targets for which we
have no support in Rust. No architecture-specific definition has been
provided for those. See [^1] for details on the generic definition and
[^2] for details on the MIPS definition.

[^1]: <https://github.com/wbx-github/uclibc-ng/blob/60d8e8c0cb9be8a241f6f2645daba260c8aec33c/libc/sysdeps/linux/common/bits/siginfo.h>
[^2]: <https://github.com/wbx-github/uclibc-ng/blob/60d8e8c0cb9be8a241f6f2645daba260c8aec33c/libc/sysdeps/linux/mips/bits/siginfo.h>

(backport <rust-lang#5345>)
(cherry picked from commit 11a1a64)
[ Needed to adjust the body of si_int for the cherry pick since on
  libc-0.2, sigval is still a struct - Trevor ]
Remove older bindings to `siginfo_t` using dummy fields instead of the
upstream `union`. This follows from the patch providing a full
definition for uClibc bindings.

Add modified bindings to `new` module.

(backport <rust-lang#5345>)
(cherry picked from commit ae20d43)
If we expand the definitions from
https://github.com/NetBSD/src/blob/d04b0c735abc997743bb3faa74464524cbe7becd/sys/sys/wait.h#L61
we get

	#define WIFCONTINUED(x)	(x == 0xffff)
	#define WIFSTOPPED(x)	((x & 0177) == 0177 && !WIFCONTINUED(x))

Our definition of WIFSTOPPED forgot the !WIFCONTINUED(x) condition.
Siince the wait(3p) status for "continued" is 0xffff, this causes
WIFSTOPPED to return true for continued child processes.

Fix this.

Originally reported at fish-shell/fish-shell#12929

(backport <rust-lang#5458>)
(cherry picked from commit a7f62d0)
@tgross35
tgross35 force-pushed the backport-purple-majesty branch 2 times, most recently from d8d9174 to 764ecea Compare September 4, 2026 08:16
@tgross35
tgross35 added this pull request to the merge queue Sep 4, 2026
Backporting the apple-*OS CI fixes around c859fcc ("Use
cargo-apple-runner for testing iOS and tvOS") fails on this branch with
errors like:

      cargo:warning=/Applications/Xcode_26.6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.5.sdk/usr/include/mach/mach_vm.h:1:2: error: mach_vm.h unsupported.
      cargo:warning=    1 | #error mach_vm.h unsupported.
      cargo:warning=      |  ^
      cargo:warning=/Users/runner/work/libc/libc/target/aarch64-apple-ios-sim/debug/build/libc-test/334ed535de220e54/out/ctest_output.c:37154:29: error: use of undeclared identifier 'mach_vm_map'
      cargo:warning= 37154 |     return (ctest_void_func)mach_vm_map;
      cargo:warning=       |                             ^~~~~~~~~~~
      cargo:warning=2 errors generated.

The mach API has long been deprecated anyway, so disable remove it on
iOS, watchOS, visionOS, and tvOS.
@tgross35
tgross35 force-pushed the backport-purple-majesty branch from 764ecea to 7512ef4 Compare September 4, 2026 08:35
@tgross35

tgross35 commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Fyi @madsmtm for the final commit here (7512ef4 currently), think this should be fine though

Merged via the queue into rust-lang:libc-0.2 with commit e6bfb18 Sep 4, 2026
@tgross35
tgross35 deleted the backport-purple-majesty branch September 4, 2026 09:07
@madsmtm

madsmtm commented Sep 4, 2026

Copy link
Copy Markdown
Member

Looks good, that should only be available on macOS

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.