diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2015-01-06 11:52:38 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-01-27 04:38:00 -0500 |
commit | 54e45c169dbce43cf46d00eb1521b655b6e4f9e9 (patch) | |
tree | 12dddd58fc6ec2b791ab4549d3b7f1e6eb0c33d3 /include/linux/syscalls.h | |
parent | e9fb8b7e4f6af17e3aa4835281e06fdc920341f9 (diff) |
syscalls: Declare sys_*stat64 prototypes if __ARCH_WANT_(COMPAT_)STAT64
Currently, the sys_stat64, sys_fstat64 and sys_lstat64 prototpyes are
only declared if BITS_PER_LONG == 32. Following commit 0753f70f07fb
(fs: Build sys_stat64() and friends if __ARCH_WANT_COMPAT_STAT64), the
implementation of these functions is allowed on 64-bit systems for
compat support. The patch changes the condition on the prototype
declaration from BITS_PER_LONG == 32 to defined(__ARCH_WANT_STAT64) ||
defined(__ARCH_WANT_COMPAT_STAT64).
In addition, it moves the sys_fstatat64 prototype under the same #if
block
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r-- | include/linux/syscalls.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 85893d744901..76d1e38aabe1 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -410,12 +410,16 @@ asmlinkage long sys_newlstat(const char __user *filename, | |||
410 | struct stat __user *statbuf); | 410 | struct stat __user *statbuf); |
411 | asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf); | 411 | asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf); |
412 | asmlinkage long sys_ustat(unsigned dev, struct ustat __user *ubuf); | 412 | asmlinkage long sys_ustat(unsigned dev, struct ustat __user *ubuf); |
413 | #if BITS_PER_LONG == 32 | 413 | #if defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_COMPAT_STAT64) |
414 | asmlinkage long sys_stat64(const char __user *filename, | 414 | asmlinkage long sys_stat64(const char __user *filename, |
415 | struct stat64 __user *statbuf); | 415 | struct stat64 __user *statbuf); |
416 | asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf); | 416 | asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf); |
417 | asmlinkage long sys_lstat64(const char __user *filename, | 417 | asmlinkage long sys_lstat64(const char __user *filename, |
418 | struct stat64 __user *statbuf); | 418 | struct stat64 __user *statbuf); |
419 | asmlinkage long sys_fstatat64(int dfd, const char __user *filename, | ||
420 | struct stat64 __user *statbuf, int flag); | ||
421 | #endif | ||
422 | #if BITS_PER_LONG == 32 | ||
419 | asmlinkage long sys_truncate64(const char __user *path, loff_t length); | 423 | asmlinkage long sys_truncate64(const char __user *path, loff_t length); |
420 | asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length); | 424 | asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length); |
421 | #endif | 425 | #endif |
@@ -771,8 +775,6 @@ asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, | |||
771 | umode_t mode); | 775 | umode_t mode); |
772 | asmlinkage long sys_newfstatat(int dfd, const char __user *filename, | 776 | asmlinkage long sys_newfstatat(int dfd, const char __user *filename, |
773 | struct stat __user *statbuf, int flag); | 777 | struct stat __user *statbuf, int flag); |
774 | asmlinkage long sys_fstatat64(int dfd, const char __user *filename, | ||
775 | struct stat64 __user *statbuf, int flag); | ||
776 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, | 778 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, |
777 | int bufsiz); | 779 | int bufsiz); |
778 | asmlinkage long sys_utimensat(int dfd, const char __user *filename, | 780 | asmlinkage long sys_utimensat(int dfd, const char __user *filename, |