From 0c9c9d4e1460ecca2f035bfccd96bd6937d7bd71 Mon Sep 17 00:00:00 2001 From: Bob Haarman Date: Tue, 9 May 2023 17:08:51 +0000 Subject: [PATCH] add use cfg_if::cfg_if to a few more tests --- test/sys/test_sockopt.rs | 1 + test/test_sendfile.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/test/sys/test_sockopt.rs b/test/sys/test_sockopt.rs index a498bdfa2c..7cf9d2765e 100644 --- a/test/sys/test_sockopt.rs +++ b/test/sys/test_sockopt.rs @@ -1,5 +1,6 @@ #[cfg(any(target_os = "android", target_os = "linux"))] use crate::*; +use cfg_if::cfg_if; use nix::sys::socket::{ getsockopt, setsockopt, socket, sockopt, AddressFamily, SockFlag, SockProtocol, SockType, diff --git a/test/test_sendfile.rs b/test/test_sendfile.rs index a34f1abeb5..13d5722475 100644 --- a/test/test_sendfile.rs +++ b/test/test_sendfile.rs @@ -1,5 +1,6 @@ #[cfg(any(target_os = "android", target_os = "linux"))] use crate::require_largefile; +use cfg_if::cfg_if; use std::io::prelude::*; #[cfg(any(target_os = "android", target_os = "linux"))] use std::os::unix::io::{AsRawFd, FromRawFd, OwnedFd};