Skip to content

Commit d1a7591

Browse files
committed
Auto merge of rust-lang#496 - lucab:to-upstream/fchdir, r=alexcrichton
unix: add fchdir(2) Add missing [fchdir(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html) function - chdir to an open file descriptor. Fixes rust-lang/libc#495
2 parents 18a1de5 + 7a26079 commit d1a7591

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/unix/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ extern {
366366
pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
367367
pub fn alarm(seconds: ::c_uint) -> ::c_uint;
368368
pub fn chdir(dir: *const c_char) -> ::c_int;
369+
pub fn fchdir(dirfd: ::c_int) -> ::c_int;
369370
pub fn chown(path: *const c_char, uid: uid_t,
370371
gid: gid_t) -> ::c_int;
371372
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),

0 commit comments

Comments
 (0)