Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82b355d1 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

y2038: Remove newstat family from default syscall set



We have four generations of stat() syscalls:
- the oldstat syscalls that are only used on the older architectures
- the newstat family that is used on all 64-bit architectures but
  lacked support for large files on 32-bit architectures.
- the stat64 family that is used mostly on 32-bit architectures to
  replace newstat
- statx() to replace all of the above, adding 64-bit timestamps among
  other things.

We already compile stat64 only on those architectures that need it,
but newstat is always built, including on those that don't reference
it. This adds a new __ARCH_WANT_NEW_STAT symbol along the lines of
__ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 to control compilation of
newstat. All architectures that need it use an explict define, the
others now get a little bit smaller, and future architecture (including
64-bit targets) won't ever see it.

Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 743f5cdb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

#define NR_SYSCALLS			523

#define __ARCH_WANT_NEW_STAT
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_GETHOSTNAME
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include <uapi/asm/unistd.h>
#include <asm/unistd-nr.h>

#define __ARCH_WANT_NEW_STAT
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_GETHOSTNAME
#define __ARCH_WANT_SYS_PAUSE
+1 −0
Original line number Diff line number Diff line
@@ -16,5 +16,6 @@
 */

#define __ARCH_WANT_RENAMEAT
#define __ARCH_WANT_NEW_STAT

#include <asm-generic/unistd.h>
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#define __IGNORE_vfork		/* clone() */
#define __IGNORE_umount2	/* umount() */

#define __ARCH_WANT_NEW_STAT

#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)

#include <linux/types.h>
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@

#define NR_syscalls		380

#define __ARCH_WANT_NEW_STAT
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
#define __ARCH_WANT_STAT64
Loading