Skip to content

Commit

Permalink
Auto merge of #2780 - asomers:LIO_READV, r=Amanieu
Browse files Browse the repository at this point in the history
Add LIO_READV and LIO_WRITEV on FreeBSD

They are used along with lio_listio for non-POSIX vectored operations.
  • Loading branch information
bors committed May 9, 2022
2 parents 4f88b8d + 5768391 commit bdf2f4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Expand Up @@ -2254,6 +2254,9 @@ fn test_freebsd(target: &str) {
true
}

// Added in FreeBSD 14
"LIO_READV" | "LIO_WRITEV" | "LIO_VECTORED" if Some(14) > freebsd_ver => true,

_ => false,
}
});
Expand Down
5 changes: 5 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -1885,6 +1885,11 @@ impl ::Clone for dot3Vendors {
}
}

// aio.h
pub const LIO_VECTORED: ::c_int = 4;
pub const LIO_WRITEV: ::c_int = 5;
pub const LIO_READV: ::c_int = 6;

// sys/devicestat.h
pub const DEVSTAT_N_TRANS_FLAGS: ::c_int = 4;
pub const DEVSTAT_NAME_LEN: ::c_int = 16;
Expand Down

0 comments on commit bdf2f4c

Please sign in to comment.