Skip to content

Commit fb31f88

Browse files
committed
make ci/style.sh happy
1 parent 3d74718 commit fb31f88

File tree

3 files changed

+24
-30
lines changed

3 files changed

+24
-30
lines changed

src/unix/linux_like/android/mod.rs

Lines changed: 4 additions & 0 deletions
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,

src/unix/linux_like/linux/mod.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,26 @@ s! {
722722
pub salt: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE],
723723
pub rec_seq: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE],
724724
}
725+
726+
pub struct posix_spawn_file_actions_t {
727+
__allocated: ::c_int,
728+
__used: ::c_int,
729+
__actions: *mut ::c_int,
730+
__pad: [::c_int; 16],
731+
}
732+
733+
pub struct posix_spawnattr_t {
734+
__flags: ::c_short,
735+
__pgrp: ::pid_t,
736+
__sd: ::sigset_t,
737+
__ss: ::sigset_t,
738+
#[cfg(any(target_env = "musl", target_env = "ohos"))]
739+
__prio: ::c_int,
740+
#[cfg(not(any(target_env = "musl", target_env = "ohos")))]
741+
__sp: ::sched_param,
742+
__policy: ::c_int,
743+
__pad: [::c_int; 16],
744+
}
725745
}
726746

727747
s_no_extra_traits! {

src/unix/linux_like/mod.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,6 @@ pub type timer_t = *mut ::c_void;
66
pub type key_t = ::c_int;
77
pub type id_t = ::c_uint;
88

9-
cfg_if! {
10-
if #[cfg(target_os = "android")] {
11-
// these structs sit behind a heap allocation on Android
12-
pub type posix_spawn_file_actions_t = *mut ::c_void;
13-
pub type posix_spawnattr_t = *mut ::c_void;
14-
} else if #[cfg(not(target_os = "emscripten"))] {
15-
s! {
16-
pub struct posix_spawn_file_actions_t {
17-
__allocated: ::c_int,
18-
__used: ::c_int,
19-
__actions: *mut ::c_int,
20-
__pad: [::c_int; 16],
21-
}
22-
23-
pub struct posix_spawnattr_t {
24-
__flags: ::c_short,
25-
__pgrp: ::pid_t,
26-
__sd: ::sigset_t,
27-
__ss: ::sigset_t,
28-
#[cfg(any(target_env = "musl", target_env = "ohos"))]
29-
__prio: ::c_int,
30-
#[cfg(not(any(target_env = "musl", target_env = "ohos")))]
31-
__sp: ::sched_param,
32-
__policy: ::c_int,
33-
__pad: [::c_int; 16],
34-
}
35-
}
36-
}
37-
}
38-
399
missing! {
4010
#[cfg_attr(feature = "extra_traits", derive(Debug))]
4111
pub enum timezone {}

0 commit comments

Comments
 (0)