File tree Expand file tree Collapse file tree 4 files changed +46
-0
lines changed Expand file tree Collapse file tree 4 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,12 @@ fn main() {
129
129
130
130
if bsdlike {
131
131
cfg. header ( "sys/event.h" ) ;
132
+
133
+ if freebsd {
134
+ cfg. header ( "libutil.h" ) ;
135
+ } else {
136
+ cfg. header ( "util.h" ) ;
137
+ }
132
138
}
133
139
134
140
if linux {
@@ -138,6 +144,7 @@ fn main() {
138
144
cfg. header ( "sys/xattr.h" ) ;
139
145
cfg. header ( "sys/ipc.h" ) ;
140
146
cfg. header ( "sys/shm.h" ) ;
147
+ cfg. header ( "pty.h" ) ;
141
148
}
142
149
143
150
if linux || android {
Original file line number Diff line number Diff line change @@ -592,6 +592,19 @@ extern {
592
592
info : * mut siginfo_t ) -> :: c_int ;
593
593
}
594
594
595
+ #[ link( name = "util" ) ]
596
+ extern "C" {
597
+ pub fn openpty ( amaster : * mut :: c_int ,
598
+ aslave : * mut :: c_int ,
599
+ name : * mut :: c_char ,
600
+ termp : * mut termios ,
601
+ winp : * mut :: winsize ) -> :: c_int ;
602
+ pub fn forkpty ( amaster : * mut :: c_int ,
603
+ name : * mut :: c_char ,
604
+ termp : * mut termios ,
605
+ winp : * mut :: winsize ) -> :: pid_t ;
606
+ }
607
+
595
608
cfg_if ! {
596
609
if #[ cfg( target_os = "freebsd" ) ] {
597
610
mod freebsd;
Original file line number Diff line number Diff line change @@ -395,6 +395,19 @@ extern {
395
395
pub fn fdatasync ( fd : :: c_int ) -> :: c_int ;
396
396
}
397
397
398
+ #[ link( name = "util" ) ]
399
+ extern "C" {
400
+ pub fn openpty ( amaster : * mut :: c_int ,
401
+ aslave : * mut :: c_int ,
402
+ name : * mut :: c_char ,
403
+ termp : * mut termios ,
404
+ winp : * mut :: winsize ) -> :: c_int ;
405
+ pub fn forkpty ( amaster : * mut :: c_int ,
406
+ name : * mut :: c_char ,
407
+ termp : * mut termios ,
408
+ winp : * mut :: winsize ) -> :: pid_t ;
409
+ }
410
+
398
411
cfg_if ! {
399
412
if #[ cfg( target_os = "bitrig" ) ] {
400
413
mod bitrig;
Original file line number Diff line number Diff line change @@ -533,6 +533,19 @@ extern {
533
533
info : * mut siginfo_t ) -> :: c_int ;
534
534
}
535
535
536
+ #[ link( name = "util" ) ]
537
+ extern "C" {
538
+ pub fn openpty ( amaster : * mut :: c_int ,
539
+ aslave : * mut :: c_int ,
540
+ name : * mut :: c_char ,
541
+ termp : * const termios ,
542
+ winp : * const :: winsize ) -> :: c_int ;
543
+ pub fn forkpty ( amaster : * mut :: c_int ,
544
+ name : * mut :: c_char ,
545
+ termp : * const termios ,
546
+ winp : * const :: winsize ) -> :: pid_t ;
547
+ }
548
+
536
549
cfg_if ! {
537
550
if #[ cfg( any( target_env = "musl" ,
538
551
target_os = "emscripten" ) ) ] {
You can’t perform that action at this time.
0 commit comments