Skip to content

Commit

Permalink
Merge pull request #3690 from tesuji/android-posix-spawn
Browse files Browse the repository at this point in the history
Re-add `posix_spawn{_file_actions_t,attr_t}` on Android
  • Loading branch information
the8472 authored May 17, 2024
2 parents 664947b + b2b2fd7 commit 0bbb5cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,7 @@ fn test_android(target: &str) {
"sched.h",
"semaphore.h",
"signal.h",
"spawn.h",
"stddef.h",
"stdint.h",
"stdio.h",
Expand Down Expand Up @@ -1767,6 +1768,9 @@ 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,
_ => false,
}
});
Expand Down
4 changes: 4 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0bbb5cd

Please # to comment.