diff options
author | Ryan Zoeller <rtzoeller@rtzoeller.com> | 2022-06-06 18:50:19 -0500 |
---|---|---|
committer | Ryan Zoeller <rtzoeller@rtzoeller.com> | 2022-06-06 18:50:19 -0500 |
commit | 80f8320ffd9caf64542916a63f986ba1f95e4613 (patch) | |
tree | 91ccd5e2dc7d2d06aa783bb76cc6ccbef992dadd | |
parent | 5dedbc7850448ae3922ab0a833f3eb971bf7e25f (diff) | |
download | nix-80f8320ffd9caf64542916a63f986ba1f95e4613.zip |
Cleanup cfg blocks
Remove obsolete references to target_env = wasi, target_os = nacl,
target_os = osx, and a typo'd target_os = fushsia that didn't compile
when fixed.
- target_env = wasi is dead: https://github.com/rust-lang/rust/pull/60117
- target_os = nacl is dead: https://github.com/rust-lang/rust/pull/45041
- target_os = osx is dead, but I can't find a link.
-rw-r--r-- | src/env.rs | 1 | ||||
-rw-r--r-- | src/fcntl.rs | 6 | ||||
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | src/net/if_.rs | 3 | ||||
-rw-r--r-- | src/sys/socket/sockopt.rs | 6 | ||||
-rw-r--r-- | test/sys/test_sockopt.rs | 3 | ||||
-rw-r--r-- | test/test_fcntl.rs | 4 |
7 files changed, 9 insertions, 15 deletions
@@ -42,7 +42,6 @@ pub unsafe fn clearenv() -> std::result::Result<(), ClearEnvError> { cfg_if! { if #[cfg(any(target_os = "fuchsia", target_os = "wasi", - target_env = "wasi", target_env = "uclibc", target_os = "linux", target_os = "android", diff --git a/src/fcntl.rs b/src/fcntl.rs index 7319302d..6f9fa15d 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -20,7 +20,7 @@ use crate::{ target_os = "android", target_os = "emscripten", target_os = "fuchsia", - any(target_os = "wasi", target_env = "wasi"), + target_os = "wasi", target_env = "uclibc", target_os = "freebsd" ))] @@ -828,7 +828,7 @@ pub fn fspacectl_all(fd: RawFd, offset: libc::off_t, len: libc::off_t) target_os = "android", target_os = "emscripten", target_os = "fuchsia", - any(target_os = "wasi", target_env = "wasi"), + target_os = "wasi", target_env = "uclibc", target_os = "freebsd" ))] @@ -877,7 +877,7 @@ mod posix_fadvise { target_os = "dragonfly", target_os = "emscripten", target_os = "fuchsia", - any(target_os = "wasi", target_env = "wasi"), + target_os = "wasi", target_os = "freebsd" ))] pub fn posix_fallocate(fd: RawFd, offset: libc::off_t, len: libc::off_t) -> Result<()> { @@ -116,7 +116,6 @@ feature! { } #[cfg(any(target_os = "dragonfly", target_os = "freebsd", - target_os = "fushsia", target_os = "linux", target_os = "netbsd"))] feature! { diff --git a/src/net/if_.rs b/src/net/if_.rs index 535d6c22..045efad9 100644 --- a/src/net/if_.rs +++ b/src/net/if_.rs @@ -103,8 +103,7 @@ libc_bitflags!( target_os = "freebsd", target_os = "macos", target_os = "netbsd", - target_os = "openbsd", - target_os = "osx"))] + target_os = "openbsd"))] #[cfg_attr(docsrs, doc(cfg(all())))] IFF_SIMPLEX; /// Supports multicast. (see diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs index 73d15406..33c86cd2 100644 --- a/src/sys/socket/sockopt.rs +++ b/src/sys/socket/sockopt.rs @@ -380,8 +380,7 @@ sockopt_impl!( #[cfg(any(target_os = "android", target_os = "dragonfly", target_os = "freebsd", - target_os = "linux", - target_os = "nacl"))] + target_os = "linux"))] #[cfg(feature = "net")] sockopt_impl!( #[cfg_attr(docsrs, doc(cfg(feature = "net")))] @@ -993,8 +992,7 @@ mod test { } #[cfg(any(target_os = "freebsd", - target_os = "linux", - target_os = "nacl"))] + target_os = "linux"))] #[test] fn can_get_listen_on_tcp_socket() { use super::super::*; diff --git a/test/sys/test_sockopt.rs b/test/sys/test_sockopt.rs index 4f75e178..a17bc09f 100644 --- a/test/sys/test_sockopt.rs +++ b/test/sys/test_sockopt.rs @@ -170,8 +170,7 @@ fn test_so_tcp_keepalive() { #[cfg(any(target_os = "android", target_os = "dragonfly", target_os = "freebsd", - target_os = "linux", - target_os = "nacl"))] { + target_os = "linux"))] { let x = getsockopt(fd, sockopt::TcpKeepIdle).unwrap(); setsockopt(fd, sockopt::TcpKeepIdle, &(x + 1)).unwrap(); assert_eq!(getsockopt(fd, sockopt::TcpKeepIdle).unwrap(), x + 1); diff --git a/test/test_fcntl.rs b/test/test_fcntl.rs index ebfc43e2..5f2e53bd 100644 --- a/test/test_fcntl.rs +++ b/test/test_fcntl.rs @@ -462,7 +462,7 @@ mod linux_android { target_os = "android", target_os = "emscripten", target_os = "fuchsia", - any(target_os = "wasi", target_env = "wasi"), + target_os = "wasi", target_env = "uclibc", target_os = "freebsd"))] mod test_posix_fadvise { @@ -495,7 +495,7 @@ mod test_posix_fadvise { target_os = "dragonfly", target_os = "emscripten", target_os = "fuchsia", - any(target_os = "wasi", target_env = "wasi"), + target_os = "wasi", target_os = "freebsd"))] mod test_posix_fallocate { |