File tree Expand file tree Collapse file tree 7 files changed +23
-0
lines changed Expand file tree Collapse file tree 7 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1559,6 +1559,8 @@ extern {
1559
1559
pub fn lio_listio ( mode : :: c_int , aiocb_list : * const * mut aiocb ,
1560
1560
nitems : :: c_int , sevp : * mut sigevent ) -> :: c_int ;
1561
1561
1562
+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
1563
+
1562
1564
pub fn lutimes ( file : * const :: c_char , times : * const :: timeval ) -> :: c_int ;
1563
1565
1564
1566
pub fn getutxent ( ) -> * mut utmpx ;
Original file line number Diff line number Diff line change @@ -918,6 +918,7 @@ extern {
918
918
pub fn aio_cancel ( fd : :: c_int , aiocbp : * mut aiocb ) -> :: c_int ;
919
919
pub fn lio_listio ( mode : :: c_int , aiocb_list : * const * mut aiocb ,
920
920
nitems : :: c_int , sevp : * mut sigevent ) -> :: c_int ;
921
+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
921
922
pub fn getnameinfo ( sa : * const :: sockaddr ,
922
923
salen : :: socklen_t ,
923
924
host : * mut :: c_char ,
Original file line number Diff line number Diff line change @@ -644,6 +644,15 @@ pub const P_PGID: idtype_t = 4;
644
644
pub const B460800 : :: speed_t = 460800 ;
645
645
pub const B921600 : :: speed_t = 921600 ;
646
646
647
+ // dirfd() is a macro on netbsd to access
648
+ // the first field of the struct where dirp points to:
649
+ // http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36
650
+ f ! {
651
+ pub fn dirfd( dirp: * mut :: DIR ) -> :: c_int {
652
+ unsafe { * ( dirp as * const :: c_int) }
653
+ }
654
+ }
655
+
647
656
extern {
648
657
pub fn aio_read ( aiocbp : * mut aiocb ) -> :: c_int ;
649
658
pub fn aio_write ( aiocbp : * mut aiocb ) -> :: c_int ;
Original file line number Diff line number Diff line change @@ -457,6 +457,7 @@ pub const KI_MAXLOGNAME: ::c_int = 32;
457
457
pub const KI_EMULNAMELEN : :: c_int = 8 ;
458
458
459
459
extern {
460
+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
460
461
pub fn getnameinfo ( sa : * const :: sockaddr ,
461
462
salen : :: socklen_t ,
462
463
host : * mut :: c_char ,
Original file line number Diff line number Diff line change @@ -749,6 +749,7 @@ extern {
749
749
pub fn ioctl ( fd : :: c_int , request : :: c_int , ...) -> :: c_int ;
750
750
pub fn mprotect ( addr : * const :: c_void , len : :: size_t , prot : :: c_int )
751
751
-> :: c_int ;
752
+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
752
753
pub fn getnameinfo ( sa : * const :: sockaddr ,
753
754
salen : :: socklen_t ,
754
755
host : * mut :: c_char ,
Original file line number Diff line number Diff line change @@ -1040,6 +1040,8 @@ extern {
1040
1040
serv : * mut :: c_char ,
1041
1041
sevlen : :: socklen_t ,
1042
1042
flags : :: c_int ) -> :: c_int ;
1043
+ pub fn pthread_setschedprio ( native : :: pthread_t ,
1044
+ priority : :: c_int ) -> :: c_int ;
1043
1045
pub fn prlimit ( pid : :: pid_t , resource : :: c_int , new_limit : * const :: rlimit ,
1044
1046
old_limit : * mut :: rlimit ) -> :: c_int ;
1045
1047
pub fn prlimit64 ( pid : :: pid_t ,
Original file line number Diff line number Diff line change @@ -835,6 +835,7 @@ extern {
835
835
rqtp : * const :: timespec ,
836
836
rmtp : * mut :: timespec ) -> :: c_int ;
837
837
pub fn clock_settime ( clk_id : clockid_t , tp : * const :: timespec ) -> :: c_int ;
838
+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
838
839
pub fn settimeofday ( tv : * const :: timeval , tz : * const :: timezone ) -> :: c_int ;
839
840
840
841
pub fn prctl ( option : :: c_int , ...) -> :: c_int ;
@@ -962,6 +963,12 @@ extern {
962
963
pshared : :: c_int ) -> :: c_int ;
963
964
pub fn pthread_condattr_getpshared ( attr : * const pthread_condattr_t ,
964
965
pshared : * mut :: c_int ) -> :: c_int ;
966
+ pub fn pthread_getschedparam ( native : :: pthread_t ,
967
+ policy : * mut :: c_int ,
968
+ param : * mut :: sched_param ) -> :: c_int ;
969
+ pub fn pthread_setschedparam ( native : :: pthread_t ,
970
+ policy : :: c_int ,
971
+ param : * const :: sched_param ) -> :: c_int ;
965
972
pub fn sched_getaffinity ( pid : :: pid_t ,
966
973
cpusetsize : :: size_t ,
967
974
cpuset : * mut cpu_set_t ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments