fixup! Add ttyname_r

Add cfg_attr
This commit is contained in:
Danilo Bargen 2019-06-23 22:58:06 +02:00
parent f4f8986fed
commit ccdc5ebc2d

View File

@ -753,6 +753,8 @@ extern {
pub fn tcgetpgrp(fd: ::c_int) -> pid_t; pub fn tcgetpgrp(fd: ::c_int) -> pid_t;
pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int; pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int;
pub fn ttyname(fd: ::c_int) -> *mut c_char; pub fn ttyname(fd: ::c_int) -> *mut c_char;
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
link_name = "ttyname_r$UNIX2003")]
pub fn ttyname_r(fd: ::c_int, pub fn ttyname_r(fd: ::c_int,
buf: *mut c_char, buflen: ::size_t) -> ::c_int; buf: *mut c_char, buflen: ::size_t) -> ::c_int;
pub fn unlink(c: *const c_char) -> ::c_int; pub fn unlink(c: *const c_char) -> ::c_int;