From f16c132f3cdeaee603d5e7b19e033dbbaec2e4f3 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Sun, 28 Jan 2024 18:33:11 -0600 Subject: [PATCH] Fix unused import when pipe2 isn't available --- src/fds.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fds.rs b/src/fds.rs index 9dd48d046..8e26e4556 100644 --- a/src/fds.rs +++ b/src/fds.rs @@ -7,8 +7,7 @@ use crate::wchar::prelude::*; use crate::wutil::perror; use errno::{errno, set_errno}; use libc::{ - c_int, EINTR, FD_CLOEXEC, F_DUPFD_CLOEXEC, F_GETFD, F_GETFL, F_SETFD, F_SETFL, O_CLOEXEC, - O_NONBLOCK, + c_int, EINTR, FD_CLOEXEC, F_DUPFD_CLOEXEC, F_GETFD, F_GETFL, F_SETFD, F_SETFL, O_NONBLOCK, }; use nix::{fcntl::OFlag, unistd}; use std::ffi::CStr; @@ -139,7 +138,7 @@ pub fn make_autoclose_pipes() -> Option { let mut already_cloexec = false; #[cfg(HAVE_PIPE2)] { - if unsafe { libc::pipe2(&mut pipes[0], O_CLOEXEC) } < 0 { + if unsafe { libc::pipe2(&mut pipes[0], libc::O_CLOEXEC) } < 0 { FLOG!(warning, PIPE_ERROR); perror("pipe2"); return None;