diff options
author | gnzlbg <gonzalobg88@gmail.com> | 2019-03-25 19:15:53 +0100 |
---|---|---|
committer | gnzlbg <gonzalobg88@gmail.com> | 2019-03-25 19:43:58 +0100 |
commit | 0a9511eb21b6fa081174911cdcb4f271c37ca809 (patch) | |
tree | df7fa39641b2ad6a7c9307421343b5d4ef48eed0 | |
parent | e1c9ad190b48da673a672c501c423e72a6ed2ba2 (diff) | |
download | rust-libc-0a9511eb21b6fa081174911cdcb4f271c37ca809.tar.gz |
Move inotify_event to the linux and android sub-modules
-rw-r--r-- | libc-test/build.rs | 26 | ||||
-rw-r--r-- | src/unix/notbsd/android/mod.rs | 7 | ||||
-rw-r--r-- | src/unix/notbsd/linux/mod.rs | 7 | ||||
-rw-r--r-- | src/unix/notbsd/mod.rs | 7 |
4 files changed, 25 insertions, 22 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index d3d35614e7..9ecfdc0d59 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1065,22 +1065,18 @@ fn test_openbsd(target: &str) { } }); - cfg.field_name(move |struct_, field| { - match field { - "st_birthtime" if struct_.starts_with("stat") => { - "__st_birthtime".to_string() - } - "st_birthtime_nsec" if struct_.starts_with("stat") => { - "__st_birthtimensec".to_string() - } - s if s.ends_with("_nsec") && struct_.starts_with("stat") => { - s.replace("e_nsec", ".tv_nsec") - } - "sa_sigaction" if struct_ == "sigaction" => { - "sa_handler".to_string() - } - s => s.to_string(), + cfg.field_name(move |struct_, field| match field { + "st_birthtime" if struct_.starts_with("stat") => { + "__st_birthtime".to_string() + } + "st_birthtime_nsec" if struct_.starts_with("stat") => { + "__st_birthtimensec".to_string() + } + s if s.ends_with("_nsec") && struct_.starts_with("stat") => { + s.replace("e_nsec", ".tv_nsec") } + "sa_sigaction" if struct_ == "sigaction" => "sa_handler".to_string(), + s => s.to_string(), }); cfg.skip_field_type(move |struct_, field| { diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index 2f62a0930d..15d450d272 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -249,6 +249,13 @@ s_no_extra_traits!{ pub ivlen: u32, pub iv: [::c_uchar; 0], } + + pub struct inotify_event { + pub wd: ::c_int, + pub mask: ::uint32_t, + pub cookie: ::uint32_t, + pub len: ::uint32_t + } } cfg_if! { diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index b9ecc9de9f..cb9dc6ac79 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -524,6 +524,13 @@ s_no_extra_traits!{ pub ivlen: u32, pub iv: [::c_uchar; 0], } + + pub struct inotify_event { + pub wd: ::c_int, + pub mask: ::uint32_t, + pub cookie: ::uint32_t, + pub len: ::uint32_t + } } cfg_if! { diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index 13ddb292d3..bc5c48fc0e 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -208,13 +208,6 @@ s! { pub ar_op: u16, } - pub struct inotify_event { - pub wd: ::c_int, - pub mask: ::uint32_t, - pub cookie: ::uint32_t, - pub len: ::uint32_t - } - pub struct mmsghdr { pub msg_hdr: ::msghdr, pub msg_len: ::c_uint, |