File tree 4 files changed +37
-0
lines changed
4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ fn main() {
130
130
131
131
if bsdlike {
132
132
cfg. header ( "sys/event.h" ) ;
133
+
134
+ if freebsd {
135
+ cfg. header ( "libutil.h" ) ;
136
+ } else {
137
+ cfg. header ( "util.h" ) ;
138
+ }
133
139
}
134
140
135
141
if linux {
@@ -139,6 +145,7 @@ fn main() {
139
145
cfg. header ( "sys/xattr.h" ) ;
140
146
cfg. header ( "sys/ipc.h" ) ;
141
147
cfg. header ( "sys/shm.h" ) ;
148
+ cfg. header ( "pty.h" ) ;
142
149
}
143
150
144
151
if linux || android {
Original file line number Diff line number Diff line change @@ -568,6 +568,7 @@ pub const RTLD_NODELETE: ::c_int = 0x1000;
568
568
pub const RTLD_NOLOAD : :: c_int = 0x2000 ;
569
569
pub const RTLD_GLOBAL : :: c_int = 0x100 ;
570
570
571
+ #[ link( name = "util" ) ]
571
572
extern {
572
573
pub fn getnameinfo ( sa : * const :: sockaddr ,
573
574
salen : :: socklen_t ,
@@ -617,6 +618,15 @@ extern {
617
618
timeout : * const :: timespec ) -> :: c_int ;
618
619
pub fn sigwaitinfo ( set : * const sigset_t ,
619
620
info : * mut siginfo_t ) -> :: c_int ;
621
+ pub fn openpty ( amaster : * mut :: c_int ,
622
+ aslave : * mut :: c_int ,
623
+ name : * mut :: c_char ,
624
+ termp : * mut termios ,
625
+ winp : * mut :: winsize ) -> :: c_int ;
626
+ pub fn forkpty ( amaster : * mut :: c_int ,
627
+ name : * mut :: c_char ,
628
+ termp : * mut termios ,
629
+ winp : * mut :: winsize ) -> :: pid_t ;
620
630
}
621
631
622
632
cfg_if ! {
Original file line number Diff line number Diff line change @@ -376,6 +376,7 @@ pub const Q_SETQUOTA: ::c_int = 0x400;
376
376
377
377
pub const RTLD_GLOBAL : :: c_int = 0x100 ;
378
378
379
+ #[ link( name = "util" ) ]
379
380
extern {
380
381
pub fn mincore ( addr : * mut :: c_void , len : :: size_t ,
381
382
vec : * mut :: c_char ) -> :: c_int ;
@@ -393,6 +394,15 @@ extern {
393
394
flags : :: c_int ) -> :: c_int ;
394
395
pub fn futimens ( fd : :: c_int , times : * const :: timespec ) -> :: c_int ;
395
396
pub fn fdatasync ( fd : :: c_int ) -> :: c_int ;
397
+ pub fn openpty ( amaster : * mut :: c_int ,
398
+ aslave : * mut :: c_int ,
399
+ name : * mut :: c_char ,
400
+ termp : * mut termios ,
401
+ winp : * mut :: winsize ) -> :: c_int ;
402
+ pub fn forkpty ( amaster : * mut :: c_int ,
403
+ name : * mut :: c_char ,
404
+ termp : * mut termios ,
405
+ winp : * mut :: winsize ) -> :: pid_t ;
396
406
}
397
407
398
408
cfg_if ! {
Original file line number Diff line number Diff line change 398
398
}
399
399
}
400
400
401
+ #[ link( name = "util" ) ]
401
402
extern {
402
403
pub fn shm_open ( name : * const c_char , oflag : :: c_int ,
403
404
mode : mode_t ) -> :: c_int ;
@@ -531,6 +532,15 @@ extern {
531
532
timeout : * const :: timespec ) -> :: c_int ;
532
533
pub fn sigwaitinfo ( set : * const sigset_t ,
533
534
info : * mut siginfo_t ) -> :: c_int ;
535
+ pub fn openpty ( amaster : * mut :: c_int ,
536
+ aslave : * mut :: c_int ,
537
+ name : * mut :: c_char ,
538
+ termp : * const termios ,
539
+ winp : * const :: winsize ) -> :: c_int ;
540
+ pub fn forkpty ( amaster : * mut :: c_int ,
541
+ name : * mut :: c_char ,
542
+ termp : * const termios ,
543
+ winp : * const :: winsize ) -> :: pid_t ;
534
544
}
535
545
536
546
cfg_if ! {
You can’t perform that action at this time.
0 commit comments