Skip to content

Commit 4fd5cf1

Browse files
flba-ebsanstzu
authored andcommitted
Add support for alternative QNX Neutrino network stack io-sock
Signed-off-by: Florian Bartels <[email protected]>
1 parent 631aa1c commit 4fd5cf1

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

libc-test/build.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3243,7 +3243,7 @@ fn test_neutrino(target: &str) {
32433243

32443244
let mut cfg = ctest_cfg();
32453245
if target.ends_with("_iosock") {
3246-
let qnx_target_val = env::var("QNX_TARGET")
3246+
let qnx_target_val = std::env::var("QNX_TARGET")
32473247
.unwrap_or_else(|_| "QNX_TARGET_not_set_please_source_qnxsdp".into());
32483248

32493249
cfg.include(qnx_target_val + "/usr/include/io-sock");
@@ -5525,9 +5525,9 @@ fn test_aix(target: &str) {
55255525
});
55265526

55275527
cfg.type_name(move |ty, is_struct, is_union| match ty {
5528-
"DIR" => ty.to_string(),
5529-
"FILE" => ty.to_string(),
5530-
"ACTION" => ty.to_string(),
5528+
"DIR" => ty.to_string(),
5529+
"FILE" => ty.to_string(),
5530+
"ACTION" => ty.to_string(),
55315531

55325532
// 'sigval' is a struct in Rust, but a union in C.
55335533
"sigval" => format!("union sigval"),
@@ -5614,9 +5614,9 @@ fn test_aix(target: &str) {
56145614
// POSIX-compliant versions in the system libc. As a result,
56155615
// function pointer comparisons between the C and Rust sides
56165616
// would fail.
5617-
"getpwuid_r" | "getpwnam_r" | "getgrgid_r" | "getgrnam_r"
5618-
| "aio_cancel" | "aio_error" | "aio_fsync" | "aio_read"
5619-
| "aio_return" | "aio_suspend" | "aio_write" | "select" => true,
5617+
"getpwuid_r" | "getpwnam_r" | "getgrgid_r" | "getgrnam_r" | "aio_cancel"
5618+
| "aio_error" | "aio_fsync" | "aio_read" | "aio_return" | "aio_suspend"
5619+
| "aio_write" | "select" => true,
56205620

56215621
// 'getdtablesize' is a constant in the AIX header but it is
56225622
// a real function in libc which the Rust side is resolved to.
@@ -5633,7 +5633,6 @@ fn test_aix(target: &str) {
56335633
}
56345634
});
56355635

5636-
56375636
cfg.volatile_item(|i| {
56385637
use ctest::VolatileItemKind::*;
56395638
match i {

src/unix/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ pub const ATF_PUBL: c_int = 0x08;
336336
pub const ATF_USETRAILERS: c_int = 0x10;
337337

338338
cfg_if! {
339-
if #[cfg(any(target_os = "nto", target_os = "aix"))] {
339+
if #[cfg(target_os = "nto")] {
340340
pub const FNM_PERIOD: c_int = 1 << 1;
341341
} else {
342342
pub const FNM_PERIOD: c_int = 1 << 2;
@@ -376,8 +376,6 @@ cfg_if! {
376376
pub const FNM_NOESCAPE: c_int = 1 << 0;
377377
} else if #[cfg(target_os = "nto")] {
378378
pub const FNM_NOESCAPE: c_int = 1 << 2;
379-
} else if #[cfg(target_os = "aix")] {
380-
pub const FNM_NOESCAPE: c_int = 1 << 3;
381379
} else {
382380
pub const FNM_NOESCAPE: c_int = 1 << 1;
383381
}

0 commit comments

Comments
 (0)