On Wed, May 24, 2023, at 19:48, Zhangjin Wu wrote:
+static int test_syscall_args(void) +{ +#ifdef __NR_fstat
- return syscall(__NR_fstat, 0, NULL);
+#elif defined(__NR_statx)
- return syscall(__NR_statx, 0, NULL, 0, 0, NULL);
+#else +#error Neither __NR_fstat nor __NR_statx defined, cannot implement syscall_args test +#endif +}
Does this need to work on old kernels? My impression was that this is only intended to be used with the kernel that ships the copy, so you can just rely on statx to be defined and drop the old fallbacks (same as for pselect6_time64 as I commented).
Arnd