Rollup merge of #87354 - Wind-River:2021_master, r=kennytm

Update VxWork's UNIX support

1. VxWorks does not provide glibc
2. VxWorks does provide `sigemptyset` and `sigaddset`

Note: these changes are concurrent to [this PR](https://github.com/rust-lang/libc/pull/2295) in libc.
This commit is contained in:
Yuki Okushi 2021-07-27 19:52:42 +09:00 committed by GitHub
commit 90f6d7becb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -1,12 +1,14 @@
use super::*;
#[test]
#[cfg(not(target_os = "vxworks"))]
fn test_glibc_version() {
// This mostly just tests that the weak linkage doesn't panic wildly...
glibc_version();
}
#[test]
#[cfg(not(target_os = "vxworks"))]
fn test_parse_glibc_version() {
let cases = [
("0.0", Some((0, 0))),

View File

@ -50,7 +50,7 @@ cfg_if::cfg_if! {
raw[bit / 8] |= 1 << (bit % 8);
return 0;
}
} else if #[cfg(not(target_os = "vxworks"))] {
} else {
pub use libc::{sigemptyset, sigaddset};
}
}