Message ID | 20240914073552.2976703-1-caiyinyu@loongson.cn |
---|---|
State | New |
Headers | show |
Series | LoongArch: Undef __NR_fstat and __NR_newfstatat. | expand |
> In Linux 6.11, fstat and newfstatat are added back. To avoid the messy > usage of the fstat, newfstatat, and statx system calls, we will continue > using statx only in glibc, maintaining consistency with previous versions of > the LoongArch-specific glibc implementation. > > Signed-off-by: caiyinyu <caiyinyu@loongson.cn> > Reviewed-by: Xi Ruoyao <xry111@xry111.site> > Reviewed-by: Miao Wang <shankerwangmiao@gmail.com> > --- > sysdeps/unix/sysv/linux/loongarch/sysdep.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/sysdeps/unix/sysv/linux/loongarch/sysdep.h b/sysdeps/unix/sysv/linux/loongarch/sysdep.h > index eb0ba790da..8a6c33de38 100644 > --- a/sysdeps/unix/sysv/linux/loongarch/sysdep.h > +++ b/sysdeps/unix/sysv/linux/loongarch/sysdep.h > @@ -109,6 +109,11 @@ > #undef SYS_ify > #define SYS_ify(syscall_name) __NR_##syscall_name > > +/* To avoid the messy usage of the fstat, newfstatat, and statx system calls, we > +only use statx. */ > +#undef __NR_fstat > +#undef __NR_newfstatat > + > #ifndef __ASSEMBLER__ > > #define VDSO_NAME "LINUX_5.10" I think this is better handled via <fixup-asm-unistd.h>; see sysdeps/unix/sysv/linux/arc/fixup-asm-unistd.h for an example. The generator script will take this into account when producing arch-syscall.h. Thanks, Florian
diff --git a/sysdeps/unix/sysv/linux/loongarch/sysdep.h b/sysdeps/unix/sysv/linux/loongarch/sysdep.h index eb0ba790da..8a6c33de38 100644 --- a/sysdeps/unix/sysv/linux/loongarch/sysdep.h +++ b/sysdeps/unix/sysv/linux/loongarch/sysdep.h @@ -109,6 +109,11 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name +/* To avoid the messy usage of the fstat, newfstatat, and statx system calls, we +only use statx. */ +#undef __NR_fstat +#undef __NR_newfstatat + #ifndef __ASSEMBLER__ #define VDSO_NAME "LINUX_5.10"