From: Bruno Haible Date: Thu, 16 Nov 2023 13:06:29 +0000 (+0100) Subject: boot-time: Make it work on Adélie Linux. X-Git-Tag: v1.0~585 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=83d3ef153dd2a2808470bc31957068d743e8f4c5;p=gnulib.git boot-time: Make it work on Adélie Linux. * lib/boot-time.c (get_boot_time_uncached): Invoke Linux fallbacks also on Linux systems that have neither nor . --- diff --git a/ChangeLog b/ChangeLog index 9132fef875..8b9c3344eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-11-16 Bruno Haible + + boot-time: Make it work on Adélie Linux. + * lib/boot-time.c (get_boot_time_uncached): Invoke Linux fallbacks also + on Linux systems that have neither nor . + 2023-11-15 Bruno Haible obstack: Modernize, fixing several problems. diff --git a/lib/boot-time.c b/lib/boot-time.c index fe5b5b88c8..70329c3aa5 100644 --- a/lib/boot-time.c +++ b/lib/boot-time.c @@ -203,7 +203,14 @@ get_boot_time_uncached (struct timespec *p_boot_time) } # endif -# else /* old FreeBSD, OpenBSD, native Windows */ +# else /* Adélie Linux, old FreeBSD, OpenBSD, native Windows */ + +# if defined __linux__ && !defined __ANDROID__ + /* Workaround for Adélie Linux: */ + get_linux_boot_time_fallback (&found_boot_time); + if (found_boot_time.tv_sec == 0) + get_linux_boot_time_final_fallback (&found_boot_time); +# endif # if defined __OpenBSD__ /* Workaround for OpenBSD: */