From 87b813a7cfc66525a05085c4f49f8fee7b018a59 Mon Sep 17 00:00:00 2001 From: Vincent Dagonneau <vincentdagonneau@gmail.com> Date: Tue, 19 Feb 2019 09:38:56 +0100 Subject: [PATCH] Moved inotify_rm_watch out of the generic notbsd target and into specific linux and android targets because the second argument has a different type in android and linux. --- libc-test/build.rs | 2 -- src/unix/notbsd/android/mod.rs | 1 + src/unix/notbsd/linux/mod.rs | 1 + src/unix/notbsd/mod.rs | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index ce4ed1e4..e0bd795b 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -153,7 +153,6 @@ fn do_ctest() { cfg.header("xlocale.h"); cfg.header("utmp.h"); cfg.header("ifaddrs.h"); - cfg.header("sys/inotify.h"); if i686 || x86_64 { cfg.header("sys/reg.h"); } @@ -263,7 +262,6 @@ fn do_ctest() { cfg.header("sys/personality.h"); cfg.header("sys/swap.h"); cfg.header("pty.h"); - cfg.header("sys/inotify.h"); if !uclibc { cfg.header("sys/sysinfo.h"); } diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index df4d5b81..c09eb3f1 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -1954,6 +1954,7 @@ extern { f: extern fn(*mut ::c_void) -> *mut ::c_void, value: *mut ::c_void) -> ::c_int; pub fn __errno() -> *mut ::c_int; + pub fn inotify_rm_watch(fd: ::c_int, wd: ::uint32_t) -> ::c_int; } cfg_if! { diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index 788e7718..0ee6e5a3 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -2291,6 +2291,7 @@ extern { nobj: ::size_t, stream: *mut ::FILE ) -> ::size_t; + pub fn inotify_rm_watch(fd: ::c_int, wd: ::c_int) -> ::c_int; } cfg_if! { diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index b9f3bc25..305fd3d1 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -1425,7 +1425,6 @@ extern { pub fn inotify_add_watch(fd: ::c_int, path: *const ::c_char, mask: ::uint32_t) -> ::c_int; - pub fn inotify_rm_watch(fd: ::c_int, wd: ::c_int) -> ::c_int; } cfg_if! { -- GitLab