Skip to content

Commit ee8a490

Browse files
committed
haiku: add openpty/forkpty, and link to libbsd.
1 parent 6de9e63 commit ee8a490

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/unix/haiku/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,7 @@ f! {
860860
}
861861
}
862862

863+
#[link(name = "bsd")]
863864
extern {
864865
pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
865866
pub fn clock_settime(clk_id: ::c_int, tp: *const ::timespec) -> ::c_int;
@@ -995,6 +996,15 @@ extern {
995996
link_name = "popen$UNIX2003")]
996997
pub fn popen(command: *const c_char,
997998
mode: *const c_char) -> *mut ::FILE;
999+
pub fn openpty(amaster: *mut ::c_int,
1000+
aslave: *mut ::c_int,
1001+
name: *mut ::c_char,
1002+
termp: *mut termios,
1003+
winp: *mut ::winsize) -> ::c_int;
1004+
pub fn forkpty(amaster: *mut ::c_int,
1005+
name: *mut ::c_char,
1006+
termp: *mut termios,
1007+
winp: *mut ::winsize) -> ::pid_t;
9981008
}
9991009

10001010
cfg_if! {

0 commit comments

Comments
 (0)