Skip to content

Commit 15c8102

Browse files
committed
Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x32 uapi changes from Peter Anvin: "This is the first few of a set of patches by H.J. Lu to make the kernel uapi headers usable for x32, as required by some non-glibc libcs. These particular patches make the stat and statfs structures usable" * 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, x32: Use __kernel_long_t for __statfs_word x86, x32: Use __kernel_long_t/__kernel_ulong_t in x86-64 stat.h
2 parents c9cdd9a + 79dbbc6 commit 15c8102

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

arch/x86/include/uapi/asm/stat.h

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef _ASM_X86_STAT_H
22
#define _ASM_X86_STAT_H
33

4+
#include <asm/posix_types.h>
5+
46
#define STAT_HAVE_NSEC 1
57

68
#ifdef __i386__
@@ -78,26 +80,26 @@ struct stat64 {
7880
#else /* __i386__ */
7981

8082
struct stat {
81-
unsigned long st_dev;
82-
unsigned long st_ino;
83-
unsigned long st_nlink;
84-
85-
unsigned int st_mode;
86-
unsigned int st_uid;
87-
unsigned int st_gid;
88-
unsigned int __pad0;
89-
unsigned long st_rdev;
90-
long st_size;
91-
long st_blksize;
92-
long st_blocks; /* Number 512-byte blocks allocated. */
93-
94-
unsigned long st_atime;
95-
unsigned long st_atime_nsec;
96-
unsigned long st_mtime;
97-
unsigned long st_mtime_nsec;
98-
unsigned long st_ctime;
99-
unsigned long st_ctime_nsec;
100-
long __unused[3];
83+
__kernel_ulong_t st_dev;
84+
__kernel_ulong_t st_ino;
85+
__kernel_ulong_t st_nlink;
86+
87+
unsigned int st_mode;
88+
unsigned int st_uid;
89+
unsigned int st_gid;
90+
unsigned int __pad0;
91+
__kernel_ulong_t st_rdev;
92+
__kernel_long_t st_size;
93+
__kernel_long_t st_blksize;
94+
__kernel_long_t st_blocks; /* Number 512-byte blocks allocated. */
95+
96+
__kernel_ulong_t st_atime;
97+
__kernel_ulong_t st_atime_nsec;
98+
__kernel_ulong_t st_mtime;
99+
__kernel_ulong_t st_mtime_nsec;
100+
__kernel_ulong_t st_ctime;
101+
__kernel_ulong_t st_ctime_nsec;
102+
__kernel_long_t __unused[3];
101103
};
102104

103105
/* We don't need to memset the whole thing just to initialize the padding */

include/uapi/asm-generic/statfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
#ifndef __statfs_word
1515
#if __BITS_PER_LONG == 64
16-
#define __statfs_word long
16+
#define __statfs_word __kernel_long_t
1717
#else
1818
#define __statfs_word __u32
1919
#endif

0 commit comments

Comments
 (0)