Skip to content

Commit

Permalink
Merge pull request #2 from velemas/master
Browse files Browse the repository at this point in the history
This PR adds struct stat for s390x.
  • Loading branch information
gsaslis authored Feb 21, 2022
2 parents 6cda661 + 2fea527 commit 4700f99
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 4700f99

Please sign in to comment.