Skip to content

Commit 539e50c

Browse files
committed
Auto merge of rust-lang#571 - Mic92:dirfd, r=alexcrichton
add dirfd on unix
2 parents 70f2986 + 5900879 commit 539e50c

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,8 @@ extern {
15591559
pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
15601560
nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
15611561

1562+
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
1563+
15621564
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
15631565

15641566
pub fn getutxent() -> *mut utmpx;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,7 @@ extern {
918918
pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
919919
pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
920920
nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
921+
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
921922
pub fn getnameinfo(sa: *const ::sockaddr,
922923
salen: ::socklen_t,
923924
host: *mut ::c_char,

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ pub const KI_MAXLOGNAME: ::c_int = 32;
457457
pub const KI_EMULNAMELEN: ::c_int = 8;
458458

459459
extern {
460+
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
460461
pub fn getnameinfo(sa: *const ::sockaddr,
461462
salen: ::socklen_t,
462463
host: *mut ::c_char,

src/unix/haiku/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ extern {
749749
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
750750
pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
751751
-> ::c_int;
752+
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
752753
pub fn getnameinfo(sa: *const ::sockaddr,
753754
salen: ::socklen_t,
754755
host: *mut ::c_char,

src/unix/notbsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,7 @@ extern {
835835
rqtp: *const ::timespec,
836836
rmtp: *mut ::timespec) -> ::c_int;
837837
pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
838+
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
838839
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
839840

840841
pub fn prctl(option: ::c_int, ...) -> ::c_int;

0 commit comments

Comments
 (0)