Skip to content

Commit b2b2fd7

Browse files
tesujijaparic
andcommitted
Readd posix_spawn{_file_actions_t,attr_t} on Android
Co-authored-by: Jorge Aparicio <[email protected]>
1 parent 7646277 commit b2b2fd7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libc-test/build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1613,6 +1613,7 @@ fn test_android(target: &str) {
16131613
"sched.h",
16141614
"semaphore.h",
16151615
"signal.h",
1616+
"spawn.h",
16161617
"stddef.h",
16171618
"stdint.h",
16181619
"stdio.h",
@@ -1767,6 +1768,9 @@ fn test_android(target: &str) {
17671768

17681769
// These are tested in the `linux_elf.rs` file.
17691770
"Elf64_Phdr" | "Elf32_Phdr" => true,
1771+
// These are intended to be opaque
1772+
"posix_spawn_file_actions_t" => true,
1773+
"posix_spawnattr_t" => true,
17701774
_ => false,
17711775
}
17721776
});

src/unix/linux_like/android/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ pub type Elf64_Xword = u64;
4848

4949
pub type eventfd_t = u64;
5050

51+
// these structs sit behind a heap allocation on Android
52+
pub type posix_spawn_file_actions_t = *mut ::c_void;
53+
pub type posix_spawnattr_t = *mut ::c_void;
54+
5155
s! {
5256
pub struct stack_t {
5357
pub ss_sp: *mut ::c_void,

0 commit comments

Comments
 (0)