diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2023-04-20 20:40:53 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2023-04-20 20:40:53 +0000 |
commit | 73c65650e855298a6565275d6c57c3a45d86c914 (patch) | |
tree | 850d4bfef759baa48521f7e12887d7fbe3f2792d | |
parent | Bump deps (diff) | |
download | miniserve-73c65650e855298a6565275d6c57c3a45d86c914.tar.gz miniserve-73c65650e855298a6565275d6c57c3a45d86c914.zip |
Switch from deprecated get_if_addrs to if-addrs
Fixes #1079.
Diffstat (limited to '')
-rw-r--r-- | Cargo.lock | 68 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/main.rs | 2 |
3 files changed, 21 insertions, 51 deletions
@@ -431,7 +431,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -549,12 +549,6 @@ dependencies = [ ] [[package]] -name = "c_linked_list" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" - -[[package]] name = "cc" version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -581,7 +575,7 @@ dependencies = [ "num-traits", "time 0.1.45", "wasm-bindgen", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1061,12 +1055,6 @@ dependencies = [ ] [[package]] -name = "gcc" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" - -[[package]] name = "generic-array" version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1077,28 +1065,6 @@ dependencies = [ ] [[package]] -name = "get_if_addrs" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" -dependencies = [ - "c_linked_list", - "get_if_addrs-sys", - "libc", - "winapi 0.2.8", -] - -[[package]] -name = "get_if_addrs-sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" -dependencies = [ - "gcc", - "libc", -] - -[[package]] name = "getrandom" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1351,6 +1317,16 @@ dependencies = [ ] [[package]] +name = "if-addrs" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cfc4a06638d2fd0dda83b01126fefd38ef9f04f54d2fc717a938df68b83a68d" +dependencies = [ + "libc", + "windows-sys 0.45.0", +] + +[[package]] name = "ignore" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1646,11 +1622,11 @@ dependencies = [ "fake-tty", "fast_qr", "futures", - "get_if_addrs", "grass", "hex", "http", "httparse", + "if-addrs", "libflate", "log", "maud", @@ -1770,7 +1746,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2112,7 +2088,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2379,7 +2355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2572,7 +2548,7 @@ checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2922,12 +2898,6 @@ dependencies = [ [[package]] name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" @@ -2948,7 +2918,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3104,7 +3074,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -35,7 +35,7 @@ clap_mangen = "0.2" comrak = { version = "0.18", default-features = false } fast_qr = { version = "0.8", features = ["svg"] } futures = "0.3" -get_if_addrs = "0.5" +if-addrs = "0.10" hex = "0.4" http = "0.2" httparse = "1" diff --git a/src/main.rs b/src/main.rs index 84eca2b..bf9d600 100644 --- a/src/main.rs +++ b/src/main.rs @@ -142,7 +142,7 @@ async fn run(miniserve_config: MiniserveConfig) -> Result<(), ContextualError> { if !wildcard.is_empty() { let all_ipv4 = wildcard.iter().any(|addr| addr.is_ipv4()); let all_ipv6 = wildcard.iter().any(|addr| addr.is_ipv6()); - ifaces = get_if_addrs::get_if_addrs() + ifaces = if_addrs::get_if_addrs() .unwrap_or_else(|e| { error!("Failed to get local interface addresses: {}", e); Default::default() |