]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tools/nolibc: fall back to sys_clock_gettime() in gettimeofday()
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 28 Apr 2025 12:40:15 +0000 (14:40 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Wed, 21 May 2025 13:32:15 +0000 (15:32 +0200)
commit5e7392dc82ed7bf3e734cbca77a1c6fd044ec871
treecf7ad24729506cbecb6c9367d421d0d5b198f531
parenta009a0c6faa9e7ffac13d55ef6cdac1f9a68efbe
tools/nolibc: fall back to sys_clock_gettime() in gettimeofday()

Newer architectures (like riscv32) do not implement sys_gettimeofday().
In those cases fall back to sys_clock_gettime().
While that does not support the timezone argument of sys_gettimeofday(),
specifying this argument invokes undefined behaviour, so it's safe to ignore.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-14-3c043eeab06c@linutronix.de
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/sys/time.h