From fc59d9403d9f5a4a03041fad898cc4ec7cfc0664 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 7 May 2024 00:34:46 +0700 Subject: [PATCH] Readd posix_spawn{_file_actions_t,attr_t} on Android Co-authored-by: Jorge Aparicio --- libc-test/build.rs | 1 + src/unix/linux_like/android/mod.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 2b15c958d2d51..403b12a48b07d 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3299,6 +3299,7 @@ fn test_vxworks(target: &str) { fn test_linux(target: &str) { assert!(target.contains("linux")); + assert!(!target.contains("android")); // target_env let gnu = target.contains("gnu"); diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index ce8e9782c49a0..fb0b06701507c 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,