Fix more CI errors in PR #449

This commit is contained in:
Alan Somers 2016-11-13 14:35:17 -07:00
parent 9245e0727b
commit e0ff0d6185
5 changed files with 35 additions and 29 deletions

View File

@ -430,9 +430,13 @@ fn main() {
// the symbol.
"uname" if freebsd => true,
// aio_waitcomplete's return type changed between FreeBSD 10 and 11.
"aio_waitcomplete" if freebsd => true,
// lio_listio confuses the checker, probably because one of its
// arguments is an array
"lio_listio" if freebsd => true,
"lio_listio" if musl => true,
_ => false,
}

View File

@ -29,7 +29,7 @@ s! {
pub aio_fildes: ::c_int,
pub aio_offset: ::off_t,
pub aio_buf: *mut ::c_void,
pub aio_nybtes: ::size_t,
pub aio_nbytes: ::size_t,
pub aio_reqprio: ::c_int,
pub aio_sigevent: sigevent,
pub aio_lio_opcode: ::c_int

View File

@ -570,7 +570,6 @@ pub const KERN_PROC_RGID: ::c_int = 8;
pub const EAI_SYSTEM: ::c_int = 11;
pub const AIO_LISTIO_MAX: ::c_int = 512;
pub const AIO_CANCELED: ::c_int = 1;
pub const AIO_NOTCANCELED: ::c_int = 2;
pub const AIO_ALLDONE: ::c_int = 3;

View File

@ -21,6 +21,24 @@ pub type nl_item = ::c_int;
pub enum fpos64_t {} // TODO: fill this out with a struct
s! {
pub struct aiocb {
pub aio_fildes: ::c_int,
pub aio_lio_opcode: ::c_int,
pub aio_reqprio: ::c_int,
pub aio_buf: *mut ::c_void,
pub aio_nbytes: ::size_t,
pub aio_sigevent: ::sigevent,
__next_prio: *mut aiocb,
__abs_prio: ::c_int,
__policy: ::c_int,
__error_code: ::c_int,
__return_value: ::ssize_t,
pub aio_offset: off_t,
#[cfg(target_pointer_width = "32")]
__unused1: [::c_char; 4],
__glibc_reserved: [::c_char; 32]
}
pub struct dirent {
pub d_ino: ::ino_t,
pub d_off: ::off_t,
@ -557,6 +575,17 @@ f! {
}
extern {
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_error(aiocbp: *const 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_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
nitems: ::c_int, sevp: *mut ::sigevent) -> ::c_int;
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
pub fn setpwent();

View File

@ -176,22 +176,6 @@ s! {
#[cfg(target_pointer_width = "32")]
__unused1: [::c_int; 12]
}
pub struct aiocb {
pub aio_fildes: ::c_int,
pub aio_lio_opcode: ::c_int,
pub aio_reqprio: ::c_int,
pub aio_buf: *mut ::c_void,
pub aio_nbytes: ::size_t,
pub aio_sigevent: sigevent,
__next_prio: *mut aiocb,
__abs_prio: ::c_int,
__policy: ::c_int,
__error_code: ::c_int,
__return_value: ::ssize_t,
pub aio_offset: off_t,
__glibc_reserved: [::c_char; 32]
}
}
// intentionally not public, only used for fd_set
@ -664,6 +648,7 @@ pub const SI_LOAD_SHIFT: ::c_uint = 16;
pub const SIGEV_SIGNAL: ::c_int = 0;
pub const SIGEV_NONE: ::c_int = 1;
pub const SIGEV_THREAD: ::c_int = 2;
#[cfg(not(any(target_env = "musl")))]
pub const SIGEV_THREAD_ID: ::c_int = 4;
pub const AIO_CANCELED: ::c_int = 0;
@ -732,17 +717,6 @@ f! {
}
extern {
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_error(aiocbp: *const 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_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
pub fn getpwnam_r(name: *const ::c_char,
pwd: *mut passwd,
buf: *mut ::c_char,