diff --git a/src/lib.rs b/src/lib.rs index 82c0385e..c0a28fcb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -227,7 +227,6 @@ extern "C" { pub fn fputs(s: *const c_char, stream: *mut FILE) -> c_int; pub fn puts(s: *const c_char) -> c_int; pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int; - pub fn getline (lineptr: *mut *mut c_char, n: *mut size_t, stream: *mut FILE) -> ssize_t; pub fn fread(ptr: *mut c_void, size: size_t, nobj: size_t, stream: *mut FILE) -> size_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), @@ -281,7 +280,6 @@ extern "C" { pub fn strdup(cs: *const c_char) -> *mut c_char; pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char; pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char; - pub fn strcasestr(cs: *const c_char, ct: *const c_char) -> *mut c_char; pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int; pub fn strncasecmp(s1: *const c_char, s2: *const c_char, n: size_t) -> c_int; pub fn strlen(cs: *const c_char) -> size_t; diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index ee8108de..50bc57f4 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -2585,6 +2585,8 @@ extern { fd: ::c_int, newfd: ::c_int, ) -> ::c_int; + + pub fn getline (lineptr: *mut *mut c_char, n: *mut size_t, stream: *mut FILE) -> ssize_t; } cfg_if! { diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 06275a69..84c31ce7 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -947,6 +947,8 @@ extern { pub fn posix_openpt(flags: ::c_int) -> ::c_int; pub fn ptsname(fd: ::c_int) -> *mut ::c_char; pub fn unlockpt(fd: ::c_int) -> ::c_int; + + pub fn strcasestr(cs: *const c_char, ct: *const c_char) -> *mut c_char; } cfg_if! { diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index 6e450068..d3d79244 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -1229,6 +1229,8 @@ extern { flags: ::c_int) -> ::ssize_t; pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + + pub fn getline (lineptr: *mut *mut c_char, n: *mut size_t, stream: *mut FILE) -> ssize_t; } cfg_if! {