Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

y2038: stat: avoid 'time_t' in 'struct stat'

The time_t definition may differ between user space and kernel space,
so replace time_t with an unambiguous 'long' for the mips and sparc.

The same structures also contain 'off_t', which has the same problem,
so replace that as well on those two architectures and powerpc.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+21 -21
+8 -8
arch/mips/include/uapi/asm/stat.h
··· 26 26 gid_t st_gid; 27 27 unsigned st_rdev; 28 28 long st_pad2[2]; 29 - off_t st_size; 29 + long st_size; 30 30 long st_pad3; 31 31 /* 32 32 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime 33 33 * but we don't have it under Linux. 34 34 */ 35 - time_t st_atime; 35 + long st_atime; 36 36 long st_atime_nsec; 37 - time_t st_mtime; 37 + long st_mtime; 38 38 long st_mtime_nsec; 39 - time_t st_ctime; 39 + long st_ctime; 40 40 long st_ctime_nsec; 41 41 long st_blksize; 42 42 long st_blocks; ··· 70 70 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime 71 71 * but we don't have it under Linux. 72 72 */ 73 - time_t st_atime; 73 + long st_atime; 74 74 unsigned long st_atime_nsec; /* Reserved for st_atime expansion */ 75 75 76 - time_t st_mtime; 76 + long st_mtime; 77 77 unsigned long st_mtime_nsec; /* Reserved for st_mtime expansion */ 78 78 79 - time_t st_ctime; 79 + long st_ctime; 80 80 unsigned long st_ctime_nsec; /* Reserved for st_ctime expansion */ 81 81 82 82 unsigned long st_blksize; ··· 105 105 unsigned int st_rdev; 106 106 unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */ 107 107 108 - off_t st_size; 108 + long st_size; 109 109 110 110 /* 111 111 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
+1 -1
arch/powerpc/include/uapi/asm/stat.h
··· 40 40 uid_t st_uid; 41 41 gid_t st_gid; 42 42 unsigned long st_rdev; 43 - off_t st_size; 43 + long st_size; 44 44 unsigned long st_blksize; 45 45 unsigned long st_blocks; 46 46 unsigned long st_atime;
+12 -12
arch/sparc/include/uapi/asm/stat.h
··· 14 14 uid_t st_uid; 15 15 gid_t st_gid; 16 16 unsigned int st_rdev; 17 - off_t st_size; 18 - time_t st_atime; 19 - time_t st_mtime; 20 - time_t st_ctime; 21 - off_t st_blksize; 22 - off_t st_blocks; 17 + long st_size; 18 + long st_atime; 19 + long st_mtime; 20 + long st_ctime; 21 + long st_blksize; 22 + long st_blocks; 23 23 unsigned long __unused4[2]; 24 24 }; 25 25 ··· 57 57 unsigned short st_uid; 58 58 unsigned short st_gid; 59 59 unsigned short st_rdev; 60 - off_t st_size; 61 - time_t st_atime; 60 + long st_size; 61 + long st_atime; 62 62 unsigned long st_atime_nsec; 63 - time_t st_mtime; 63 + long st_mtime; 64 64 unsigned long st_mtime_nsec; 65 - time_t st_ctime; 65 + long st_ctime; 66 66 unsigned long st_ctime_nsec; 67 - off_t st_blksize; 68 - off_t st_blocks; 67 + long st_blksize; 68 + long st_blocks; 69 69 unsigned long __unused4[2]; 70 70 }; 71 71