Qnx8 nto80 iosock#5096
Open
skarlsson wants to merge 1443 commits intorust-lang:mainfrom
Open
Conversation
These assorted constants may have existed at some point but I can't find any reference to them in the source repo. Remove them now. (backport <rust-lang#4782>) (cherry picked from commit 17727db)
As noted, this has been deprecated a long time and is no longer present on x86_64. Remove the typedef. (backport <rust-lang#4782>) (cherry picked from commit 11d36ae)
These are currently incorrect, so remove them for now. If desired, they can be added back in the future using the `_IO*` functions. (backport <rust-lang#4782>) (cherry picked from commit 7de84bf)
Upstream commit: NetBSD/src@cc8bab3 (backport <rust-lang#4782>) (cherry picked from commit b038f17)
Link: https://github.com/NetBSD/src/blob/6017cb90fd7d83ed6e45d93129b12d525978c2fa/sys/sys/ucred.h#L52 (backport <rust-lang#4782>) (cherry picked from commit 3bb84eb)
This changed in 10.0. The change is ABI-compatible so we can make it now. This is a minor break, but should allow users to remove some special casing on NetBSD since this brings it in line with other BSDs. Link: https://github.com/NetBSD/src/blob/6017cb90fd7d83ed6e45d93129b12d525978c2fa/sys/sys/event.h#L72 (backport <rust-lang#4782>) (cherry picked from commit 14f2bc5)
Link: https://github.com/NetBSD/src/blob/6ace5fed3bd010695a1b88ca6c1f8a5af7793ffb/sys/sys/ptrace.h#L62 (backport <rust-lang#4782>) (cherry picked from commit 5e47663)
Link: https://github.com/NetBSD/src/blob/908770859a5d5141adc63c7844190d01db8a18a4/include/fnmatch.h#L43-L48 (backport <rust-lang#4782>) (cherry picked from commit cfb674c)
Link: https://github.com/NetBSD/src/blob/6017cb90fd7d83ed6e45d93129b12d525978c2fa/sys/arch/amd64/include/mcontext.h#L59-L65 (backport <rust-lang#4782>) (cherry picked from commit a47db53)
Upstream commit: NetBSD/src@a3d9e0f (backport <rust-lang#4782>) (cherry picked from commit 8ff5e7e)
Our definition was correct for how it is defined internally, but in the header where it is included it is an incomplete definition. Link: https://github.com/NetBSD/src/blob/6017cb90fd7d83ed6e45d93129b12d525978c2fa/sys/sys/sched.h#L99 (backport <rust-lang#4782>) (cherry picked from commit 95e5cdb)
Deprecate the PT_LWPINFO and PL_EVENT* constants, as well as `ptrace_lwpinfo`. Upstream commit: NetBSD/src@4f79a48 (backport <rust-lang#4782>) (cherry picked from commit c4a86e0)
Move statvfs types to the `new` module. Link: https://github.com/NetBSD/src/blob/6ace5fed3bd010695a1b88ca6c1f8a5af7793ffb/sys/sys/statvfs.h#L66-L101 (backport <rust-lang#4782>) (cherry picked from commit c4731a0)
With NetBSD10 the type changes and fields get adjusted. Make the field nonpublic now to prepare for this change in the future. This is a minor breaking change but means that the NetBSD10 updates will not be breaking. Link: https://github.com/NetBSD/src/blob/6017cb90fd7d83ed6e45d93129b12d525978c2fa/sys/sys/statvfs.h#L94 (backport <rust-lang#4782>) (cherry picked from commit d5f4354)
This went through an ABI change with a symbol version in NetBSD10. Our version still works but tests don't pass. Link: NetBSD/src@02cdd24 (backport <rust-lang#4782>) (cherry picked from commit bf0f52c)
The field ordering is incorrect on NetBSD. Move it to the `new` module for NetBSD and OpenBSD and fix the mismatch on NetBSD. Link: https://github.com/NetBSD/src/blob/6ace5fed3bd010695a1b88ca6c1f8a5af7793ffb/sys/sys/ipc.h#L54-L68 Link: https://github.com/openbsd/src/blob/9abc5df53d8ad6b65dbd35b89ed94f73e2fc58da/sys/sys/ipc.h#L53-L61 (backport <rust-lang#4782>) (cherry picked from commit 066e702)
The field order was incorrect. Update this and move it to `new`, along with the rest of `utmp`. As part of this, correct an incorrectly spelled `utpname` to `utmpname`. Fixes: 42289eb "Implement utmp for NetBSD" (backport <rust-lang#4782>) (cherry picked from commit 6a01e2f)
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)
Link: https://github.com/NetBSD/src/blob/6ace5fed3bd010695a1b88ca6c1f8a5af7793ffb/sys/sys/time.h#L305-L306 (backport <rust-lang#4782>) (cherry picked from commit 57213d4)
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)
(backport <rust-lang#4811>) (cherry picked from commit e654f3a)
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)
(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)
Add the complete set of _SC_* constants from wasi-libc's musl-based unistd.h. (backport <rust-lang#5023>) (cherry picked from commit 2aa834e)
https://github.com/msys2/msys2-runtime/blob/msys2-3.6.7/winsup/cygwin/include/sys/termios.h#L37 (backport <rust-lang#5031>) (cherry picked from commit 7e4e75c)
(backport <rust-lang#5029>) (cherry picked from commit 17ba5c1)
(backport <rust-lang#5026>) (cherry picked from commit 34527ca)
The values are different from standard newlib. (backport <rust-lang#5034>) (cherry picked from commit 9c1167e)
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me> (backport <rust-lang#5025>) (cherry picked from commit 505ad34)
Allow constructing in const contexts without `MaybeUninit`, even at our MSRV. (backport <rust-lang#5036>) (cherry picked from commit 6515ae5)
The system libc may expect these fields to be initialized. (backport <rust-lang#5036>) (cherry picked from commit 0ec02fb)
It is effectively always preferable to zero-initialize; there aren't any cases where we can't do that. (backport <rust-lang#5036>) (cherry picked from commit f6611e0)
Add new flags field and reserveds. (backport <rust-lang#4966>) (cherry picked from commit 475a519)
We did a change that is technically breaking. There isn't a way to allow overrides, so just disable the check.
(backport <rust-lang#5024>) (cherry picked from commit b6ab1fb)
The latest nightly hits an ICE in CI from [1]. [1]: rust-lang/rust#154878 (backport <rust-lang#5048>) (cherry picked from commit e26a0bd)
The `musl32_time64` cfg previously conflated two distinct concepts: 1. Type definitions: `time_t` is `i64`, `suseconds_t` is `i64`, `timespec` has padding — applies to all 32-bit musl v1.2.3+ targets including hexagon. 2. Symbol redirects: `clock_gettime` → `__clock_gettime64` etc., corresponding to musl's `_REDIR_TIME64` — applies only to arm, mips, powerpc, and x86. Hexagon was added to musl after the time64 transition and never had a 32-bit `time_t`, so its libc exports `clock_gettime` directly with no `__*_time64` symbols. Applying the link-name redirects caused undefined symbol errors at link time (rust-lang/rust#154686). Introduce a new `musl_redir_time64` cfg for the symbol redirects and restrict it to arches that define `_REDIR_TIME64`. Keep `musl32_time64` for the type/struct meaning, now set generically for all 32-bit musl v1.2.3+ targets (removing explicit `target_arch = "hexagon"` conditions). (backport <rust-lang#5040>) (cherry picked from commit a6b660c)
(backport <rust-lang#5043>) (cherry picked from commit 9b6bf99)
ESP-IDF v6.0 switched from newlib to picolibc as default C library. Picolibc uses Linux-compatible O_APPEND/O_CREAT/O_TRUNC values which differ from newlib. Add espidf_picolibc cfg to select the correct values. (backport <rust-lang#5035>) (cherry picked from commit 434c916)
Add missing constants and fix type mismatches for hexagon-unknown-linux-musl, enabling the rustix crate to build. * Constants added to errno, syscalls, poll, fs, memory, termios * Type fixes (c_int -> tcflag_t): EXTPROC, FLUSHO, IEXTEN, TOSTOP * ipc_perm.__seq changed from c_ushort to c_int with proper __pad1/__pad2 fields to match hexagon musl headers. (backport <rust-lang#5042>) (cherry picked from commit e5880b8)
(backport <rust-lang#5045>) (cherry picked from commit ff0e616)
After having tested out GNU on Windows x86, it seemed like the only issue was related to a wrongly aligned/sized `max_align_t`. This has been fixed, and the test suite seems to be running just fine in CI now for the above platform/environment. There were also some environment variables in CI that seemed to be set for the purposes of changing the Mingw toolchain set up, but that weren't truly being used as the job that ran the script that used those was being triggered earlier in the CI pipeline. Because CI logs seem to reveal this has been the case for some time, this has also been altogether removed. (backport <rust-lang#5050>) (cherry picked from commit 3a5c5d7)
(backport <rust-lang#5051>) (cherry picked from commit 30fd290)
The relevant PR has been reverted in rust-lang/rust. This reverts commit e26a0bd. (backport <rust-lang#5054>) (cherry picked from commit 3ba93f8)
(cherry picked from commit 088a284)
Add `PR_SET_MEMORY_MERGE` and `PR_GET_MEMORY_MERGE` prctl constants for the linux target. These control [per-process opt-in to KSM](https://lwn.net/Articles/953141/) and have been available since kernel 6.4. They were already defined for the android target but missing from linux (cherry picked from commit 545663c)
These are values for the flag parameter in the Apple-specific `kevent64` syscall: https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/event.h#L138-L141 (cherry picked from commit 708f24e)
QNX 8.0 ships only the io-sock network stack, which replaced TCP_KEEPALIVE with the BSD-style TCP_KEEPIDLE/TCP_KEEPINTVL/TCP_KEEPCNT triple. Values verified against /opt/qnx800/target/qnx/usr/include/netinet/tcp.h. This unblocks crates such as socket2 and tokio that cfg(target_os = "nto")-gate code expecting the io-sock keepalive constants to be visible. Related: rust-lang#5071.
Collaborator
|
☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Description:
Summary
Add
TCP_KEEPIDLE,TCP_KEEPINTVL, andTCP_KEEPCNTto the io-sockelse-arm of the existing
cfg_if!insrc/unix/nto/mod.rs, so they arevisible for
target_env = "nto71_iosock"andtarget_env = "nto80".Motivation
QNX 8.0 ships only the modern io-sock network stack. Compared to the legacy
io-pkt stack used by nto70 / nto71, io-sock dropped Apple/legacy-QNX socket
constants in favour of NetBSD/BSD-style equivalents. For TCP keepalive that
means replacing the single-value
TCP_KEEPALIVEwith the BSD tripleTCP_KEEPIDLE/TCP_KEEPINTVL/TCP_KEEPCNT.