diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2025-12-20 14:55:48 +0100 |
|---|---|---|
| committer | Thomas Weißschuh <linux@weissschuh.net> | 2026-01-04 10:28:59 +0100 |
| commit | b8f4f5d1b99e2ae73fd448e9bbd16dc244e6586c (patch) | |
| tree | 36680193640b52de83e3fe89af3251caf8ddeebe /tools | |
| parent | 668e43737279284318064bdd4eab689a3aaed652 (diff) | |
tools/nolibc/time: drop invocation of gettimeofday system call
This invocation uses libc types with a system call. While this works
now, upcoming changes to 'struct timeval' would require type
conversions. If types are converted anyways, the clock_gettime() based
fallback can be used everywhere, simplifying the code.
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-4-c662992f75d7@weissschuh.net
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/include/nolibc/sys/time.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tools/include/nolibc/sys/time.h b/tools/include/nolibc/sys/time.h index 33782a19aae9..171187836e6d 100644 --- a/tools/include/nolibc/sys/time.h +++ b/tools/include/nolibc/sys/time.h @@ -22,9 +22,6 @@ static int sys_clock_gettime(clockid_t clockid, struct timespec *tp); static __attribute__((unused)) int sys_gettimeofday(struct timeval *tv, struct timezone *tz) { -#ifdef __NR_gettimeofday - return my_syscall2(__NR_gettimeofday, tv, tz); -#else (void) tz; /* Non-NULL tz is undefined behaviour */ struct timespec tp; @@ -37,7 +34,6 @@ int sys_gettimeofday(struct timeval *tv, struct timezone *tz) } return ret; -#endif } static __attribute__((unused)) |
