From 58dcc8af13d9e89d6a02e88a924b7680903e2341 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 7 Nov 2024 10:08:14 +0100 Subject: [PATCH] emscripten: Remove `aio.h` usage See: emscripten-core/emscripten@6416c351c6d98b796dfefd8a8d00d71e83ca7fa5. (backport ) (cherry picked from commit 01c72ee99a0c6ba5bbb393ab3ef486ba06ccb0e9) --- libc-test/build.rs | 6 +----- src/unix/linux_like/emscripten/mod.rs | 26 -------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 0dc9c9ff53064..75a50afc2f810 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -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", @@ -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| { diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index 393244d9996f2..2559b3285880a 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -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, @@ -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;