Skip to content

Commit cb61441

Browse files
authored
Merge pull request #3809 from tgross35/main-posix-spawn
[main] Readd posix_spawn{_file_actions_t,attr_t} on Android
2 parents e4b69b4 + 7f42793 commit cb61441

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libc-test/build.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,7 @@ fn test_android(target: &str) {
15501550
"sched.h",
15511551
"semaphore.h",
15521552
"signal.h",
1553+
"spawn.h",
15531554
"stddef.h",
15541555
"stdint.h",
15551556
"stdio.h",
@@ -1709,6 +1710,10 @@ fn test_android(target: &str) {
17091710

17101711
// FIXME: Somehow fails to test after removing cfg hacks:
17111712
"__uint128" => true,
1713+
1714+
// These are intended to be opaque
1715+
"posix_spawn_file_actions_t" => true,
1716+
"posix_spawnattr_t" => true,
17121717
_ => false,
17131718
}
17141719
});

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)