Added dup3() support on FreeBSD, NetBSD, OpenBSD and Solaris.

This commit is contained in:
Koutheir Attouchi 2018-10-20 01:45:08 +02:00
parent 93a1995d92
commit 8915f42c9d
4 changed files with 8 additions and 0 deletions

View File

@ -1056,6 +1056,8 @@ extern {
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int;
}
cfg_if! {

View File

@ -1106,6 +1106,8 @@ extern {
base: ::locale_t) -> ::locale_t;
#[link_name = "__settimeofday50"]
pub fn settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int;
pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int;
}
#[link(name = "util")]

View File

@ -263,6 +263,8 @@ extern {
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int;
}
cfg_if! {

View File

@ -1458,4 +1458,6 @@ extern {
pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
pub fn popen(command: *const c_char,
mode: *const c_char) -> *mut ::FILE;
pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int;
}