Skip to content

Commit

Permalink
Add LIO_READV and LIO_WRITEV on FreeBSD
Browse files Browse the repository at this point in the history
They are used along with lio_listio for non-POSIX vectored operations.
  • Loading branch information
asomers committed May 7, 2022
1 parent 78d6835 commit 43daef5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libc-test/build.rs
Expand Up @@ -2254,6 +2254,15 @@ 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 43daef5

Please sign in to comment.