Skip to content

Commit 1033ce7

Browse files
committed
Auto merge of rust-lang#558 - Mic92:truncate64, r=alexcrichton
add truncate64/readdir64/openat64 on linux
2 parents 1d501bc + 677b08e commit 1033ce7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/unix/notbsd/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,14 +921,19 @@ extern {
921921
offset: off64_t)
922922
-> *mut ::c_void;
923923
pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
924+
pub fn openat64(fd: ::c_int,
925+
path: *const c_char,
926+
oflag: ::c_int, ...) -> ::c_int;
924927
pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
925928
offset: off64_t) -> ::ssize_t;
926929
pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
927930
offset: off64_t) -> ::ssize_t;
931+
pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
928932
pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
929933
result: *mut *mut ::dirent64) -> ::c_int;
930934
pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
931935
pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
936+
pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
932937
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
933938
pub fn sysinfo (info: *mut ::sysinfo) -> ::c_int;
934939

0 commit comments

Comments
 (0)