Skip to content

Commit

Permalink
emscripten: Remove aio.h usage
Browse files Browse the repository at this point in the history
See: emscripten-core/emscripten@6416c35.

(backport <rust-lang#3962>)
(cherry picked from commit 01c72ee)
  • Loading branch information
kleisauke authored and tgross35 committed Nov 15, 2024
1 parent b47f24e commit 58dcc8a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
6 changes: 1 addition & 5 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2794,7 +2794,6 @@ fn test_emscripten(target: &str) {
cfg.define("_GNU_SOURCE", None); // FIXME: ??

headers! { cfg:
"aio.h",
"ctype.h",
"dirent.h",
"dlfcn.h",
Expand Down Expand Up @@ -3019,10 +3018,7 @@ fn test_emscripten(target: &str) {
(struct_ == "sigaction" && field == "sa_sigaction") ||
// sigval is actually a union, but we pretend it's a struct
// FIXME: is this necessary?
(struct_ == "sigevent" && field == "sigev_value") ||
// aio_buf is "volatile void*" and Rust doesn't understand volatile
// FIXME: is this necessary?
(struct_ == "aiocb" && field == "aio_buf")
(struct_ == "sigevent" && field == "sigev_value")
});

cfg.skip_field(move |struct_, field| {
Expand Down
26 changes: 0 additions & 26 deletions src/unix/linux_like/emscripten/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,23 +171,6 @@ s! {
pub sem_flg: ::c_short,
}

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,
__td: *mut ::c_void,
__lock: [::c_int; 2],
__err: ::c_int,
__ret: ::ssize_t,
pub aio_offset: off_t,
__next: *mut ::c_void,
__prev: *mut ::c_void,
__dummy4: [::c_char; 24],
}

pub struct sigaction {
pub sa_sigaction: ::sighandler_t,
pub sa_mask: ::sigset_t,
Expand Down Expand Up @@ -917,15 +900,6 @@ pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;

pub const EAI_SYSTEM: ::c_int = -11;

pub const AIO_CANCELED: ::c_int = 0;
pub const AIO_NOTCANCELED: ::c_int = 1;
pub const AIO_ALLDONE: ::c_int = 2;
pub const LIO_READ: ::c_int = 0;
pub const LIO_WRITE: ::c_int = 1;
pub const LIO_NOP: ::c_int = 2;
pub const LIO_WAIT: ::c_int = 0;
pub const LIO_NOWAIT: ::c_int = 1;

pub const MREMAP_MAYMOVE: ::c_int = 1;
pub const MREMAP_FIXED: ::c_int = 2;

Expand Down

0 comments on commit 58dcc8a

Please sign in to comment.