diff --git a/Cargo.lock b/Cargo.lock index b7ad1451247..efeb156b9fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1276,8 +1276,7 @@ checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" [[package]] name = "hostname" version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd" +source = "git+https://github.com/xtqqczze/djc-hostname.git?branch=target-aix#79b3e480f43a286cf493e45471e43546ab534f6b" dependencies = [ "cfg-if", "libc", diff --git a/Cargo.toml b/Cargo.toml index 7ce0a2c10be..703b17e87f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -708,3 +708,6 @@ strip = true inherits = "release" panic = "unwind" debug = true + +[patch.crates-io] +hostname = { git = "https://github.com/xtqqczze/djc-hostname.git", branch = "target-aix" } diff --git a/src/uu/hostname/Cargo.toml b/src/uu/hostname/Cargo.toml index 36420593c29..a97c59f9a29 100644 --- a/src/uu/hostname/Cargo.toml +++ b/src/uu/hostname/Cargo.toml @@ -19,7 +19,7 @@ path = "src/hostname.rs" test = false doctest = false -[target.'cfg(any(all(unix, not(any(target_os = "aix", target_os = "redox"))), windows))'.dependencies] +[target.'cfg(any(all(unix, not(target_os = "redox")), windows))'.dependencies] clap = { workspace = true } hostname = { workspace = true, features = ["set"] } uucore = { workspace = true, features = ["wide"] } diff --git a/src/uu/hostname/benches/hostname_bench.rs b/src/uu/hostname/benches/hostname_bench.rs index 9946d7a10fa..861d0a8e643 100644 --- a/src/uu/hostname/benches/hostname_bench.rs +++ b/src/uu/hostname/benches/hostname_bench.rs @@ -19,7 +19,7 @@ //! //! Without NSS_WRAPPER, the benchmark tests with the system's real /etc/hosts. -#![cfg(any(all(unix, not(any(target_os = "aix", target_os = "redox"))), windows))] +#![cfg(any(all(unix, not(target_os = "redox")), windows))] use divan::{Bencher, black_box}; use std::io::Write; diff --git a/src/uu/hostname/src/hostname.rs b/src/uu/hostname/src/hostname.rs index da1adeb58ac..edc90ea0627 100644 --- a/src/uu/hostname/src/hostname.rs +++ b/src/uu/hostname/src/hostname.rs @@ -5,7 +5,7 @@ // spell-checker:ignore hashset Addrs addrs -#![cfg(any(all(unix, not(any(target_os = "aix", target_os = "redox"))), windows))] +#![cfg(any(all(unix, not(target_os = "redox")), windows))] use std::io::{Write, stdout}; use std::net::ToSocketAddrs;