Skip to content

Commit

Permalink
Auto merge of #2775 - asomers:aio_writev2, r=Amanieu
Browse files Browse the repository at this point in the history
Enable aio_{read,write}v on FreeBSD

When I originally added these symbols, I put them in the freebsd13
module.  But I needn't have, since they didn't change any existing
symbols.  Instead, as totally new symbols, they should've gone into the
freebsd module.  This way they can actually be used.
  • Loading branch information
bors committed May 5, 2022
2 parents 9a6c13a + fb965d3 commit e53cf4f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions libc-test/build.rs
Expand Up @@ -2355,6 +2355,8 @@ fn test_freebsd(target: &str) {

// Added in FreeBSD 13.
"getlocalbase" if Some(13) > freebsd_ver => true,
"aio_readv" if Some(13) > freebsd_ver => true,
"aio_writev" if Some(13) > freebsd_ver => true,

_ => false,
}
Expand Down
2 changes: 0 additions & 2 deletions src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
Expand Up @@ -469,8 +469,6 @@ pub const DOMAINSET_POLICY_INTERLEAVE: ::c_int = 4;
pub const MINCORE_SUPER: ::c_int = 0x20;

extern "C" {
pub fn aio_readv(aiocbp: *mut ::aiocb) -> ::c_int;
pub fn aio_writev(aiocbp: *mut ::aiocb) -> ::c_int;
pub fn setgrent();
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int;
pub fn freelocale(loc: ::locale_t);
Expand Down
2 changes: 0 additions & 2 deletions src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
Expand Up @@ -469,8 +469,6 @@ pub const DOMAINSET_POLICY_INTERLEAVE: ::c_int = 4;
pub const MINCORE_SUPER: ::c_int = 0x60;

extern "C" {
pub fn aio_readv(aiocbp: *mut ::aiocb) -> ::c_int;
pub fn aio_writev(aiocbp: *mut ::aiocb) -> ::c_int;
pub fn setgrent();
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int;
pub fn freelocale(loc: ::locale_t);
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -3840,13 +3840,15 @@ extern "C" {
pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_readv(aiocbp: *mut ::aiocb) -> ::c_int;
pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
pub fn aio_suspend(
aiocb_list: *const *const aiocb,
nitems: ::c_int,
timeout: *const ::timespec,
) -> ::c_int;
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_writev(aiocbp: *mut ::aiocb) -> ::c_int;

pub fn devname_r(
dev: ::dev_t,
Expand Down

0 comments on commit e53cf4f

Please sign in to comment.