Add z/OS (s390x-ibm-zos) support via use_file backend - #859
Closed
IgorTodorovskiIBM wants to merge 1 commit into
Closed
Add z/OS (s390x-ibm-zos) support via use_file backend#859IgorTodorovskiIBM wants to merge 1 commit into
IgorTodorovskiIBM wants to merge 1 commit into
Conversation
z/OS is a Rust tier-2 target (s390x-ibm-zos) that has /dev/urandom available (z/OS 2.1+). Use the existing use_file backend, the same as AIX, Haiku, Redox, and NTO. Changes: - src/backends.rs: add target_os = "zos" to the use_file backend group - src/utils/get_errno.rs: add target_os = "zos" to the __errno group (z/OS uses __errno() same as Android/NetBSD/OpenBSD) - Cargo.toml: add target_os = "zos" to the use_file libc dependency Tested: cargo check --target s390x-ibm-zos passes with IBM libc fork.
Member
|
Has the target landed on Nightly? It's not yet listed here. It's also worth to at least check build for the target as part of our CI, so it's probably worth to wait until the Fix the compiler warnings by adding ## [0.4.4] - UNRELEASED
### Added
- z/OS (`s390x-ibm-zos`) support via `use_file` backend ([#859])
[0.4.4]: https://github.com/rust-random/getrandom/compare/v0.4.3...master
[#859]: https://github.com/rust-random/getrandom/pull/859 |
Member
|
It looks like the target is not implemented yet, so this PR is premature. |
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.
Summary
Add z/OS support using the existing
use_filebackend (/dev/urandom).z/OS is a Rust tier-2 target (
s390x-ibm-zos). Like AIX, it has/dev/urandomavailable (z/OS 2.1+) and uses__errno()for errno access.Changes
src/backends.rs: Addtarget_os = "zos"to theuse_filebackend group (alongsideaix,haiku,redox,nto).src/utils/get_errno.rs: Addtarget_os = "zos"to the__errnogroup (alongsidenetbsd,openbsd,android,cygwin). z/OS provides__errno()returning*mut c_int.Cargo.toml: Addtarget_os = "zos"to theuse_filelibc target dependency.Testing
Tested with
cargo check --target s390x-ibm-zosusing the IBM libc fork.Note: until IBM's z/OS libc PR lands in crates.io
libc, cross-compilation requires the IBM libc fork. Once upstream libc supports z/OS, this will work out of the box.