]> Savannah Git Hosting - gnulib.git/commit
boot-time: do not depend on timespec_get
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 12 Aug 2023 22:46:43 +0000 (15:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 12 Aug 2023 22:47:20 +0000 (15:47 -0700)
commit19cb99e334bb741a719aa2ee7b3ebf8bfa8bf02b
treec1005a5d4128fa1010bb9e3b353a9e2f3a86c8b2
parent8501d38f157422dc5f41495016ee6915b36acd07
boot-time: do not depend on timespec_get

This is for Emacs, which does not use timespec_get now
and which likes to minimize dependencies.
Also, treat musl libc like recent glibc,
and fix a timespec_get return value typo.
* lib/boot-time-aux.h (get_linux_uptime):
Assume musl libc supports CLOCK_BOOTTIME.
(get_linux_boot_time_final_fallback):
Likewise for musl libc and CLOCK_REALTIME.
Do not rely on the timespec_get module, to break the dependency.
Consider 0 to be a failure return from timespec_get.
Fall back on gettimeofday if timespec_get does not exist.
* modules/boot-time (Depends-on): Remove timespec_get.
ChangeLog
lib/boot-time-aux.h
modules/boot-time