Skip to content

Commit c400d9f

Browse files
committed
Fix build on emscripten
1 parent 13d7db3 commit c400d9f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

libc-test/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2980,6 +2980,8 @@ fn test_emscripten(target: &str) {
29802980
});
29812981

29822982
cfg.skip_field(move |struct_, field| {
2983+
// _sigev_un is an anonymous union
2984+
(struct_ == "sigevent" && field == "_sigev_un") ||
29832985
// this is actually a union on linux, so we can't represent it well and
29842986
// just insert some padding.
29852987
(struct_ == "siginfo_t" && field == "_pad") ||

src/unix/linux_like/emscripten/mod.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,24 @@ s! {
342342
}
343343

344344
s_no_extra_traits! {
345+
#[cfg_attr(feature = "extra_traits", derive(Debug))]
346+
pub struct aiocb {
347+
pub aio_fildes: ::c_int,
348+
pub aio_lio_opcode: ::c_int,
349+
pub aio_reqprio: ::c_int,
350+
pub aio_buf: *mut ::c_void,
351+
pub aio_nbytes: ::size_t,
352+
pub aio_sigevent: ::sigevent,
353+
__td: *mut ::c_void,
354+
__lock: [::c_int; 2],
355+
__err: ::c_int,
356+
__ret: ::ssize_t,
357+
pub aio_offset: off_t,
358+
__next: *mut ::c_void,
359+
__prev: *mut ::c_void,
360+
__dummy4: [::c_char; 24],
361+
}
362+
345363
pub struct dirent {
346364
pub d_ino: ::ino_t,
347365
pub d_off: ::off_t,

0 commit comments

Comments
 (0)