diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index febf9fcc..e340b07e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,7 +71,7 @@ jobs: strategy: fail-fast: false matrix: - target: ["armv7-sony-vita-newlibeabihf"] + target: ["armv7-sony-vita-newlibeabihf", "i686-unknown-hurd-gnu"] steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly @@ -108,7 +108,7 @@ jobs: strategy: fail-fast: false matrix: - target: ["armv7-sony-vita-newlibeabihf"] + target: ["armv7-sony-vita-newlibeabihf", "i686-unknown-hurd-gnu"] steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly # NOTE: need nightly for `doc_cfg` feature. diff --git a/Cargo.toml b/Cargo.toml index d62d5ad4..8642bb4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ targets = ["aarch64-apple-ios", "aarch64-linux-android", "x86_64-apple-darwin", features = ["all"] [target."cfg(unix)".dependencies] -libc = "0.2.149" +libc = "0.2.150" [target.'cfg(windows)'.dependencies.windows-sys] version = "0.48" diff --git a/src/socket.rs b/src/socket.rs index 6accbb79..83c58b54 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -760,6 +760,7 @@ const fn set_common_type(ty: Type) -> Type { target_os = "dragonfly", target_os = "freebsd", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "linux", target_os = "netbsd", @@ -786,6 +787,7 @@ fn set_common_flags(socket: Socket) -> io::Result { target_os = "dragonfly", target_os = "freebsd", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "linux", target_os = "netbsd", @@ -1307,6 +1309,7 @@ impl Socket { #[cfg(not(any( target_os = "dragonfly", target_os = "haiku", + target_os = "hurd", target_os = "netbsd", target_os = "openbsd", target_os = "redox", @@ -1344,6 +1347,7 @@ impl Socket { #[cfg(not(any( target_os = "dragonfly", target_os = "haiku", + target_os = "hurd", target_os = "netbsd", target_os = "openbsd", target_os = "redox", @@ -1523,6 +1527,7 @@ impl Socket { target_os = "aix", target_os = "dragonfly", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "netbsd", target_os = "openbsd", @@ -1553,6 +1558,7 @@ impl Socket { target_os = "aix", target_os = "dragonfly", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "netbsd", target_os = "openbsd", @@ -1777,6 +1783,7 @@ impl Socket { target_os = "redox", target_os = "solaris", target_os = "haiku", + target_os = "hurd", target_os = "espidf", target_os = "vita", )))] @@ -1801,6 +1808,7 @@ impl Socket { target_os = "redox", target_os = "solaris", target_os = "haiku", + target_os = "hurd", target_os = "espidf", target_os = "vita", )))] diff --git a/src/sys/unix.rs b/src/sys/unix.rs index 8ebea025..a6f6903a 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -121,6 +121,7 @@ pub(crate) use libc::ipv6_mreq as Ipv6Mreq; #[cfg(not(any( target_os = "dragonfly", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "netbsd", target_os = "openbsd", @@ -143,6 +144,7 @@ pub(crate) use libc::IP_HDRINCL; target_os = "redox", target_os = "solaris", target_os = "haiku", + target_os = "hurd", target_os = "nto", target_os = "espidf", target_os = "vita", @@ -180,6 +182,7 @@ pub(crate) use libc::{ #[cfg(not(any( target_os = "dragonfly", target_os = "haiku", + target_os = "hurd", target_os = "netbsd", target_os = "openbsd", target_os = "redox", @@ -330,6 +333,7 @@ type IovLen = usize; target_os = "freebsd", target_os = "fuchsia", target_os = "haiku", + target_os = "hurd", target_os = "illumos", target_os = "ios", target_os = "macos", @@ -430,6 +434,7 @@ impl Type { target_os = "dragonfly", target_os = "freebsd", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "linux", target_os = "netbsd", @@ -447,6 +452,7 @@ impl Type { target_os = "dragonfly", target_os = "freebsd", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "linux", target_os = "netbsd", @@ -465,6 +471,7 @@ impl Type { target_os = "dragonfly", target_os = "freebsd", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "linux", target_os = "netbsd", @@ -1181,6 +1188,7 @@ pub(crate) fn set_tcp_keepalive(fd: Socket, keepalive: &TcpKeepalive) -> io::Res target_os = "dragonfly", target_os = "freebsd", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "ios", target_os = "linux", diff --git a/tests/socket.rs b/tests/socket.rs index 2ab87705..986db97c 100644 --- a/tests/socket.rs +++ b/tests/socket.rs @@ -348,6 +348,7 @@ fn set_cloexec() { target_os = "dragonfly", target_os = "freebsd", target_os = "fuchsia", + target_os = "hurd", target_os = "linux", target_os = "netbsd", target_os = "openbsd" @@ -1396,6 +1397,7 @@ test!(IPv4 tos, set_tos(96)); #[cfg(not(any( target_os = "dragonfly", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "netbsd", target_os = "openbsd", @@ -1442,6 +1444,7 @@ test!(IPv6 tclass_v6, set_tclass_v6(96)); #[cfg(not(any( target_os = "dragonfly", target_os = "fuchsia", + target_os = "hurd", target_os = "illumos", target_os = "netbsd", target_os = "openbsd", @@ -1495,6 +1498,7 @@ fn join_leave_multicast_v4_n() { #[cfg(not(any( target_os = "dragonfly", target_os = "haiku", + target_os = "hurd", target_os = "netbsd", target_os = "openbsd", target_os = "redox",