summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-05-30 02:05:59 -0400
committerRich Felker <dalias@aerifal.cx>2014-05-30 02:05:59 -0400
commit106e65d6f6ba4d027e1fde1b1d2fabb92714da94 (patch)
tree2ec51498ff809e94bae6c5386ffa1bceedc17933 /src
parent5cf9e8f860dcfe63b36e050dd7dfbc5e53745fce (diff)
downloadmusl-106e65d6f6ba4d027e1fde1b1d2fabb92714da94.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/internal/syscall.h20
1 files 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