mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-13 14:12:28 -05:00
tools/nolibc: always use 64-bit time types
32-bit time types will stop working in 2038. Switch to 64-bit time types everywhere. Suggested-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/lkml/cec27d94-c99d-4c57-9a12-275ea663dda8@app.fastmail.com/ Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20251220-nolibc-uapi-types-v3-9-c662992f75d7@weissschuh.net
This commit is contained in:
@@ -29,6 +29,6 @@ typedef unsigned long nlink_t;
|
||||
typedef int64_t off_t;
|
||||
typedef signed long blksize_t;
|
||||
typedef signed long blkcnt_t;
|
||||
typedef __kernel_time_t time_t;
|
||||
typedef __kernel_time64_t time_t;
|
||||
|
||||
#endif /* _NOLIBC_STD_H */
|
||||
|
||||
@@ -17,14 +17,15 @@
|
||||
#include <linux/wait.h>
|
||||
|
||||
struct timespec {
|
||||
__kernel_time_t tv_sec;
|
||||
long tv_nsec;
|
||||
time_t tv_sec;
|
||||
int64_t tv_nsec;
|
||||
};
|
||||
#define _STRUCT_TIMESPEC
|
||||
|
||||
/* Never use with system calls */
|
||||
struct timeval {
|
||||
__kernel_time_t tv_sec;
|
||||
__kernel_suseconds_t tv_usec;
|
||||
time_t tv_sec;
|
||||
int64_t tv_usec;
|
||||
};
|
||||
|
||||
#define timeval __nolibc_kernel_timeval
|
||||
|
||||
Reference in New Issue
Block a user