Skip to content

Commit 0a9511e

Browse files
committed
Move inotify_event to the linux and android sub-modules
1 parent e1c9ad1 commit 0a9511e

File tree

4 files changed

+25
-22
lines changed

4 files changed

+25
-22
lines changed

libc-test/build.rs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,22 +1065,18 @@ fn test_openbsd(target: &str) {
10651065
}
10661066
});
10671067

1068-
cfg.field_name(move |struct_, field| {
1069-
match field {
1070-
"st_birthtime" if struct_.starts_with("stat") => {
1071-
"__st_birthtime".to_string()
1072-
}
1073-
"st_birthtime_nsec" if struct_.starts_with("stat") => {
1074-
"__st_birthtimensec".to_string()
1075-
}
1076-
s if s.ends_with("_nsec") && struct_.starts_with("stat") => {
1077-
s.replace("e_nsec", ".tv_nsec")
1078-
}
1079-
"sa_sigaction" if struct_ == "sigaction" => {
1080-
"sa_handler".to_string()
1081-
}
1082-
s => s.to_string(),
1068+
cfg.field_name(move |struct_, field| match field {
1069+
"st_birthtime" if struct_.starts_with("stat") => {
1070+
"__st_birthtime".to_string()
1071+
}
1072+
"st_birthtime_nsec" if struct_.starts_with("stat") => {
1073+
"__st_birthtimensec".to_string()
1074+
}
1075+
s if s.ends_with("_nsec") && struct_.starts_with("stat") => {
1076+
s.replace("e_nsec", ".tv_nsec")
10831077
}
1078+
"sa_sigaction" if struct_ == "sigaction" => "sa_handler".to_string(),
1079+
s => s.to_string(),
10841080
});
10851081

10861082
cfg.skip_field_type(move |struct_, field| {

src/unix/notbsd/android/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,13 @@ s_no_extra_traits!{
249249
pub ivlen: u32,
250250
pub iv: [::c_uchar; 0],
251251
}
252+
253+
pub struct inotify_event {
254+
pub wd: ::c_int,
255+
pub mask: ::uint32_t,
256+
pub cookie: ::uint32_t,
257+
pub len: ::uint32_t
258+
}
252259
}
253260

254261
cfg_if! {

src/unix/notbsd/linux/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,13 @@ s_no_extra_traits!{
524524
pub ivlen: u32,
525525
pub iv: [::c_uchar; 0],
526526
}
527+
528+
pub struct inotify_event {
529+
pub wd: ::c_int,
530+
pub mask: ::uint32_t,
531+
pub cookie: ::uint32_t,
532+
pub len: ::uint32_t
533+
}
527534
}
528535

529536
cfg_if! {

src/unix/notbsd/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,6 @@ s! {
208208
pub ar_op: u16,
209209
}
210210

211-
pub struct inotify_event {
212-
pub wd: ::c_int,
213-
pub mask: ::uint32_t,
214-
pub cookie: ::uint32_t,
215-
pub len: ::uint32_t
216-
}
217-
218211
pub struct mmsghdr {
219212
pub msg_hdr: ::msghdr,
220213
pub msg_len: ::c_uint,

0 commit comments

Comments
 (0)