diff --git a/libc-test/build.rs b/libc-test/build.rs index 2da148caa61ba..02bd88ece25aa 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1546,6 +1546,7 @@ fn test_android(target: &str) { "sched.h", "semaphore.h", "signal.h", + "spawn.h", "stddef.h", "stdint.h", "stdio.h", @@ -1701,6 +1702,10 @@ fn test_android(target: &str) { // These are tested in the `linux_elf.rs` file. "Elf64_Phdr" | "Elf32_Phdr" => true, + // These are intended to be opaque + "posix_spawn_file_actions_t" => true, + "posix_spawnattr_t" => true, + // FIXME: Somehow fails to test after removing cfg hacks: "__uint128" => true, _ => false, diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index ef8c2ccaa4fde..64bd658206a4f 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -48,6 +48,10 @@ pub type Elf64_Xword = u64; pub type eventfd_t = u64; +// these structs sit behind a heap allocation on Android +pub type posix_spawn_file_actions_t = *mut ::c_void; +pub type posix_spawnattr_t = *mut ::c_void; + s! { pub struct stack_t { pub ss_sp: *mut ::c_void,