From ccdc5ebc2d5bd5c41fb0e46ebc1de651a31c3c9c Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 23 Jun 2019 22:58:06 +0200 Subject: [PATCH] fixup! Add ttyname_r Add cfg_attr --- src/unix/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 9160af3f..1d53f4a9 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -753,6 +753,8 @@ extern { pub fn tcgetpgrp(fd: ::c_int) -> pid_t; pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int; 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, buf: *mut c_char, buflen: ::size_t) -> ::c_int; pub fn unlink(c: *const c_char) -> ::c_int;