[0.2] Backports - #5462
Merged
Merged
Conversation
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)
Source: https://github.com/WebAssembly/wasi-libc/blob/6d8745c8cec1aaa82c24f2e3d7a544f7ea9c2089/libc-top-half/musl/include/locale.h#L23-L29 (backport <rust-lang#5378>) (cherry picked from commit 364e4b6)
OpenBSD source: https://github.com/openbsd/src/blob/8bdaccf9d69425873152d3ed5dfe9a5e9f6b26d8/include/dlfcn.h#L42-L49 Fixes rust-lang#5318 (backport <rust-lang#5377>) (cherry picked from commit b37a8de)
(backport <rust-lang#5382>) (cherry picked from commit a3b815f)
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)
close rust-lang#3285 (backport <rust-lang#3286>) (cherry picked from commit de71829)
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)
(backport <rust-lang#5402>) (cherry picked from commit 861c4fe)
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)
(backport <rust-lang#5407>) (cherry picked from commit 0d2a6f0)
This allows for quite a bit of cleanup. Links: * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/signal/signal.h * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/sysdeps/unix/sysv/linux/bits/sigaction.h * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/sysdeps/unix/sysv/linux/mips/bits/sigaction.h * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/sysdeps/unix/sysv/linux/s390/bits/sigaction.h * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/bits/signum-generic.h#L76 * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/sysdeps/unix/sysv/linux/bits/signum-arch.h * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/sysdeps/unix/sysv/linux/mips/bits/signum-arch.h * https://github.com/sailfishos-mirror/glibc/blob/ae646973c5957b7eed06cb80d49d13b42178072d/sysdeps/unix/sysv/linux/sparc/bits/signum-arch.h (backport <rust-lang#5408>) (cherry picked from commit 72f0135)
(backport <rust-lang#5189>) (cherry picked from commit 1a8e71f)
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)
Based on the configuration for `compiler-builtins` [1]. [1]: https://github.com/rust-lang/compiler-builtins/blob/af778498377a1bb72aefee685edf7aebd79df5b0/.github/renovate.json5 (backport <rust-lang#5415>) (cherry picked from commit 4d6f268)
(backport <rust-lang#5421>) (cherry picked from commit bd53ab4)
We now have forking-renovate set up [1]. [1]: rust-lang#5419 (backport <rust-lang#5423>) (cherry picked from commit c1dcff0)
(backport <rust-lang#5261>) (cherry picked from commit 6ac03f4)
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
force-pushed
the
backport-purple-majesty
branch
2 times, most recently
from
September 4, 2026 08:16
d8d9174 to
764ecea
Compare
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
force-pushed
the
backport-purple-majesty
branch
from
September 4, 2026 08:35
764ecea to
7512ef4
Compare
Member
Author
Member
|
Looks good, that should only be available on macOS |
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
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:
libc::ucontext_tfrom Android NDK #5189siginfo_tdefinition #5345cfgattributes to generated impls #5372SIGEV_THREAD_IDsupport #5375musl_v1_2_3tomusl_v1_2#5376target_*cfg #5402<int type>_{MIN,MAX}constants #5404signal.hdefinitions tosrc/new#5408STATX_*constants #5412f_typetostatvfsandstatvfs64#5434Padding#5435*_SUPER_MAGICconstants #5453