Skip to content

Commit

Permalink
This PR adds struct stat for s390x.
Browse files Browse the repository at this point in the history
Signed-off-by: Artiom Vaskov <artiom.vaskov@ibm.com>
  • Loading branch information
velemas committed Nov 22, 2021
1 parent 6cda661 commit 2fea527
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lfs_ffi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,31 @@ if OS == 'Linux' then
]])
stat_syscall_num = IS_64_BIT and 106 or 195
lstat_syscall_num = IS_64_BIT and 107 or 196
elseif ARCH == 's390x' then
ffi.cdef([[
typedef struct {
unsigned long st_dev;
unsigned long st_ino;
unsigned long st_nlink;
unsigned int st_mode;
unsigned int st_uid;
unsigned int st_gid;
int __pad1;
unsigned long st_rdev;
long st_size;
long st_atime;
long st_atime_nsec;
long st_mtime;
long st_mtime_nsec;
long st_ctime;
long st_ctime_nsec;
long st_blksize;
long st_blocks;
long __unused[3];
} stat;
]])
stat_syscall_num = 106
lstat_syscall_num = 107
elseif ARCH == 'arm' then
if IS_64_BIT then
ffi.cdef([[
Expand Down

0 comments on commit 2fea527

Please sign in to comment.