From 106e65d6f6ba4d027e1fde1b1d2fabb92714da94 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 30 May 2014 02:05:59 -0400 Subject: [PATCH] break down coarse-grained 64-bit-off_t syscall remappings using the existence of SYS_stat64 as the condition for remapping other related syscalls is no longer valid, since new archs that omit the old syscalls will not have SYS_stat or SYS_stat64, but still potentially need SYS_fstat and others remapped. it would probably be possible to get by with just one or two extra conditionals, but just breaking them all down into separate conditions is robust and not significantly heavier for the preprocessor. --- src/internal/syscall.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/internal/syscall.h b/src/internal/syscall.h index 3f4490e1..12cd4371 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -122,14 +122,26 @@ long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...), #ifdef SYS_stat64 #undef SYS_stat -#undef SYS_fstat -#undef SYS_lstat -#undef SYS_statfs -#undef SYS_fstatfs #define SYS_stat SYS_stat64 +#endif + +#ifdef SYS_fstat64 +#undef SYS_fstat #define SYS_fstat SYS_fstat64 +#endif + +#ifdef SYS_lstat64 +#undef SYS_lstat #define SYS_lstat SYS_lstat64 +#endif + +#ifdef SYS_statfs64 +#undef SYS_statfs #define SYS_statfs SYS_statfs64 +#endif + +#ifdef SYS_fstatfs64 +#undef SYS_fstatfs #define SYS_fstatfs SYS_fstatfs64 #endif -- 2.25.1