|
Message-Id: <20240910094112.1427937-1-lixing@loongson.cn> Date: Tue, 10 Sep 2024 17:41:12 +0800 From: Xing Li <lixing@...ngson.cn> To: musl@...ts.openwall.com Cc: wanghongliang@...ngson.cn Subject: [PATCH] loongarch64: add fstat and newfstatat syscall support linux kernel add fstat and newfstatat to solve the chromium sandbox, the link as follow: https://lore.kernel.org/loongarch/CAAhV-H7W-Ygn6tXySrip4k3P5xVbVf7GpjOzjXfQvCCbA4r5Wg@mail.gmail.com/T/#t So we add fstat and newfstatat as linux kernel. --- arch/loongarch64/bits/syscall.h.in | 2 ++ arch/loongarch64/kstat.h | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 arch/loongarch64/kstat.h diff --git a/arch/loongarch64/bits/syscall.h.in b/arch/loongarch64/bits/syscall.h.in index 2afb4ea1..43efb916 100644 --- a/arch/loongarch64/bits/syscall.h.in +++ b/arch/loongarch64/bits/syscall.h.in @@ -76,6 +76,8 @@ #define __NR_splice 76 #define __NR_tee 77 #define __NR_readlinkat 78 +#define __NR_newfstatat 79 +#define __NR_fstat 80 #define __NR_sync 81 #define __NR_fsync 82 #define __NR_fdatasync 83 diff --git a/arch/loongarch64/kstat.h b/arch/loongarch64/kstat.h new file mode 100644 index 00000000..92625f36 --- /dev/null +++ b/arch/loongarch64/kstat.h @@ -0,0 +1,21 @@ +struct kstat { + dev_t st_dev; + ino_t st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + dev_t st_rdev; + unsigned long __pad; + off_t st_size; + blksize_t st_blksize; + int __pad2; + blkcnt_t st_blocks; + long st_atime_sec; + long st_atime_nsec; + long st_mtime_sec; + long st_mtime_nsec; + long st_ctime_sec; + long st_ctime_nsec; + unsigned __unused[2]; +}; -- 2.27.0
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.