nix
nix copied to clipboard
Add an `any` constructor to Ipv6Addr
This mirrors the behaviour of Ipv4Addr::any() but for IPV6 addresses.
Unless I missed something, libc doesn't export anything resembling INADDR_ANY for IPV6, so the zeroes are hardcoded. I can't imagine that this would ever cause issues however.
The error appears to be unrelated to the change.
In C, this is called IN6ADDR_ANY_INIT. You could try adding that to libc.
Well there are two initializers in C since IPV6 uses structs instead of a 32bit int, there's the IN6ADDR_ANY_INIT macro and the in6_addr_any global. I suspected that not having them in the libc crate was intentional since they're not very useful in Rust but maybe I'm wrong. I'll open an issue in the libc repo to ask what they think.
I opened an issue in the libc crate: https://github.com/rust-lang/libc/issues/1950