diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ddcfffe3..313be5ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -66,7 +66,10 @@ jobs: target: ${{ matrix.target }} toolchain: stable override: true - - run: sudo apt install gcc-multilib + # update is needed to fix the 404 error on install, see: + # https://github.com/actions/virtual-environments/issues/675 + - run: sudo apt-get update + - run: sudo apt-get install gcc-multilib - run: cargo test --target ${{ matrix.target }} windows-tests: diff --git a/src/cloudabi.rs b/src/cloudabi.rs deleted file mode 100644 index 5c0ae411..00000000 --- a/src/cloudabi.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2018 Developers of the Rand project. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Implementation for CloudABI -use crate::Error; -use core::num::NonZeroU32; - -extern "C" { - fn cloudabi_sys_random_get(buf: *mut u8, buf_len: usize) -> u16; -} - -pub fn getrandom_inner(dest: &mut [u8]) -> Result<(), Error> { - let errno = unsafe { cloudabi_sys_random_get(dest.as_mut_ptr(), dest.len()) }; - if let Some(code) = NonZeroU32::new(errno as u32) { - Err(Error::from(code)) - } else { - Ok(()) // Zero means success for CloudABI - } -} diff --git a/src/lib.rs b/src/lib.rs index e9244398..30516217 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,7 +24,6 @@ //! | Solaris, illumos | `*‑solaris`, `*‑illumos` | [`getrandom()`][9] if available, otherwise [`/dev/random`][10] //! | Fuchsia OS | `*‑fuchsia` | [`cprng_draw`][11] //! | Redox | `*‑redox` | [`rand:`][12] -//! | CloudABI | `*‑cloudabi` | [`cloudabi_sys_random_get`][13] //! | Haiku | `*‑haiku` | `/dev/random` (identical to `/dev/urandom`) //! | SGX | `x86_64‑*‑sgx` | [RDRAND][18] //! | VxWorks | `*‑wrs‑vxworks‑*` | `randABytes` after checking entropy pool initialization with `randSecure` @@ -133,7 +132,6 @@ //! [10]: https://docs.oracle.com/cd/E86824_01/html/E54777/random-7d.html //! [11]: https://fuchsia.dev/fuchsia-src/zircon/syscalls/cprng_draw //! [12]: https://github.com/redox-os/randd/blob/master/src/main.rs -//! [13]: https://github.com/nuxinl/cloudabi#random_get //! [14]: https://www.w3.org/TR/WebCryptoAPI/#Crypto-method-getRandomValues //! [15]: https://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback //! [16]: #webassembly-support @@ -186,8 +184,6 @@ cfg_if! { } else if #[cfg(any(target_os = "freebsd", target_os = "netbsd"))] { mod util_libc; #[path = "bsd_arandom.rs"] mod imp; - } else if #[cfg(target_os = "cloudabi")] { - #[path = "cloudabi.rs"] mod imp; } else if #[cfg(target_os = "fuchsia")] { #[path = "fuchsia.rs"] mod imp; } else if #[cfg(target_os = "ios")] {