]> Savannah Git Hosting - gnulib.git/commit
readutmp, boot-time: Use the BSD sysctl as fallback.
authorBruno Haible <bruno@clisp.org>
Sat, 12 Aug 2023 13:09:50 +0000 (15:09 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 12 Aug 2023 13:09:50 +0000 (15:09 +0200)
commitd87389976e71521818c7b11234208bb076a0f4ab
treeac4e62d47df33d75bec0ba53333050df748e2a18
parent2e5f2c80d5a3d493009f3873247712a790d248bf
readutmp, boot-time: Use the BSD sysctl as fallback.

* m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test for <sys/param.h>,
<sys/sysctl.h>, sysctl.
* lib/boot-time-aux.h (get_bsd_boot_time_final_fallback): New function.
* lib/readutmp.c: Include <sys/param.h> and <sys/sysctl.h>.
(read_utmp_from_file): Invoke get_bsd_boot_time_final_fallback as a
fallback.
* lib/boot-time.c: Include <sys/param.h> and <sys/sysctl.h>.
(get_boot_time_uncached): Invoke get_bsd_boot_time_final_fallback as a
fallback.
ChangeLog
lib/boot-time-aux.h
lib/boot-time.c
lib/readutmp.c
m4/readutmp.m4