6 #include <kernel_stat.h>
8 #include <nacl_syscalls.h>
11 int __fxstat64(int vers
, int fd
, struct stat64
*buf
)
13 int (*nacl_fstat
)(int fd
, struct nacl_abi_stat
*buf
) =
14 NACL_SYSCALL_ADDR(NACL_sys_fstat
);
16 struct nacl_abi_stat nacl_buf
;
17 int result
= nacl_fstat(fd
, &nacl_buf
);
22 buf
->st_dev
= nacl_buf
.nacl_abi_st_dev
;
23 #ifdef _HAVE_STAT64___PAD1
26 #ifdef _HAVE_STAT64___ST_INO
27 buf
->__st_ino
= nacl_buf
.nacl_abi_st_ino
;
29 buf
->st_mode
= nacl_buf
.nacl_abi_st_mode
;
30 buf
->st_nlink
= nacl_buf
.nacl_abi_st_nlink
;
31 buf
->st_uid
= nacl_buf
.nacl_abi_st_uid
;
32 buf
->st_gid
= nacl_buf
.nacl_abi_st_gid
;
33 buf
->st_rdev
= nacl_buf
.nacl_abi_st_rdev
;
34 #ifdef _HAVE_STAT64___PAD2
37 buf
->st_size
= nacl_buf
.nacl_abi_st_size
;
38 buf
->st_blksize
= nacl_buf
.nacl_abi_st_blksize
;
39 buf
->st_blocks
= nacl_buf
.nacl_abi_st_blocks
;
40 buf
->st_atim
.tv_sec
= nacl_buf
.nacl_abi_st_atime
;
41 buf
->st_atim
.tv_nsec
= 0;
42 buf
->st_mtim
.tv_sec
= nacl_buf
.nacl_abi_st_mtime
;
43 buf
->st_mtim
.tv_nsec
= 0;
44 buf
->st_ctim
.tv_sec
= nacl_buf
.nacl_abi_st_ctime
;
45 buf
->st_ctim
.tv_nsec
= 0;
46 buf
->st_ino
= nacl_buf
.nacl_abi_st_ino
;
49 hidden_def (__fxstat64
)