Skip to content

Commit

Permalink
Auto merge of #3486 - devnexen:linux_iocb, r=JohnTitor
Browse files Browse the repository at this point in the history
adding iocb data for io_submit syscall for linux/glibc.

close #3485
  • Loading branch information
bors committed Dec 19, 2023
2 parents 05d807f + 389d1ed commit bb4eae6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/build.rs
Expand Up @@ -3406,6 +3406,7 @@ fn test_linux(target: &str) {
headers! {
cfg:
"asm/mman.h",
[gnu]: "linux/aio_abi.h",
"linux/can.h",
"linux/can/raw.h",
// FIXME: requires kernel headers >= 5.4.1.
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux-gnu.txt
Expand Up @@ -638,6 +638,7 @@ glob64
glob64_t
globfree
globfree64
iocb
lio_listio
mallinfo
mallinfo2
Expand Down
22 changes: 22 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Expand Up @@ -3,6 +3,7 @@ pub type __priority_which_t = ::c_uint;
pub type __rlimit_resource_t = ::c_uint;
pub type Lmid_t = ::c_long;
pub type regoff_t = ::c_int;
pub type __kernel_rwf_t = ::c_int;

cfg_if! {
if #[cfg(doc)] {
Expand Down Expand Up @@ -432,6 +433,27 @@ s! {
pub len: ::__u32,
pub options: ::__u32,
}

pub struct iocb {
pub aio_data: ::__u64,
#[cfg(target_endian = "little")]
pub aio_key: ::__u32,
#[cfg(target_endian = "little")]
pub aio_rw_flags: ::__kernel_rwf_t,
#[cfg(target_endian = "big")]
pub aio_rw_flags: ::__kernel_rwf_t,
#[cfg(target_endian = "big")]
pub aio_key: ::__u32,
pub aio_lio_opcode: ::__u16,
pub aio_reqprio: ::__s16,
pub aio_fildes: ::__u32,
pub aio_buf: ::__u64,
pub aio_nbytes: ::__u64,
pub aio_offset: ::__s64,
aio_reserved2: ::__u64,
pub aio_flags: ::__u32,
pub aio_resfd: ::__u32,
}
}

impl siginfo_t {
Expand Down

0 comments on commit bb4eae6

Please sign in to comment.