Skip to content

Commit

Permalink
Readd posix_spawn{_file_actions_t,attr_t} on Android
Browse files Browse the repository at this point in the history
Fixes: rust-lang#3709
Fixes: rust-lang#3608
Fixes: rust-lang#3677

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>

[resolved conflict, update commit message - Trevor]
(apply <rust-lang#3690> to `main`)
(cherry picked from commit b2b2fd7)

Signed-off-by: Trevor Gross <tmgross@umich.edu>
  • Loading branch information
tesuji authored and tgross35 committed Aug 12, 2024
1 parent 2c935f8 commit 7f42793
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,7 @@ fn test_android(target: &str) {
"sched.h",
"semaphore.h",
"signal.h",
"spawn.h",
"stddef.h",
"stdint.h",
"stdio.h",
Expand Down Expand Up @@ -1709,6 +1710,10 @@ fn test_android(target: &str) {

// FIXME: Somehow fails to test after removing cfg hacks:
"__uint128" => 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 7f42793

Please sign in to comment.