mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 02:03:41 +08:00
Fix build error when HAVE_PIPE2 is true
NB: I only encountered this when rewriting the cfg detection, which means that the previous detection wasn't correct since I have pipe2 on Linux but didn't run into this build error before.
This commit is contained in:
parent
6e002b6d80
commit
e02c572738
|
@ -143,7 +143,8 @@ pub struct AutoClosePipes {
|
|||
pub fn make_autoclose_pipes() -> Option<AutoClosePipes> {
|
||||
let mut pipes: [c_int; 2] = [-1, -1];
|
||||
|
||||
let already_cloexec = false;
|
||||
#[allow(unused_mut, unused_assignments)]
|
||||
let mut already_cloexec = false;
|
||||
#[cfg(HAVE_PIPE2)]
|
||||
{
|
||||
if unsafe { libc::pipe2(&mut pipes[0], O_CLOEXEC) } < 0 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user