Skip to content

Commit 076d53a

Browse files
committed
aix: add stat64at function declaration
In AIX, when large file API enabled, fstatat will be redirected to stat64at function. Also, fix clockid_t to its original definition, as time-rs builds well with this change.
1 parent 8356615 commit 076d53a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/unix/aix/mod.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
pub type c_char = i8;
22
pub type caddr_t = *mut ::c_char;
3-
// FIXME: clockid_t must be c_long, but time.rs accepts only i32
4-
pub type clockid_t = ::c_int;
3+
pub type clockid_t = ::c_longlong;
54
pub type blkcnt_t = ::c_long;
65
pub type clock_t = ::c_int;
76
pub type daddr_t = ::c_long;
@@ -3273,7 +3272,13 @@ extern "C" {
32733272
pub fn splice(socket1: ::c_int, socket2: ::c_int, flags: ::c_int) -> ::c_int;
32743273
pub fn srand(seed: ::c_uint);
32753274
pub fn srand48(seed: ::c_long);
3276-
pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
3275+
pub fn stat64(path: *const ::c_char, buf: *mut stat64) -> ::c_int;
3276+
pub fn stat64at(
3277+
dirfd: ::c_int,
3278+
path: *const ::c_char,
3279+
buf: *mut stat64,
3280+
flags: ::c_int,
3281+
) -> ::c_int;
32773282
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
32783283
pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int;
32793284
pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int;

0 commit comments

Comments
 (0)