From 83d3ef153dd2a2808470bc31957068d743e8f4c5 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 16 Nov 2023 14:06:29 +0100 Subject: [PATCH] =?utf8?q?boot-time:=20Make=20it=20work=20on=20Ad=C3=A9lie?= =?utf8?q?=20Linux.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lib/boot-time.c (get_boot_time_uncached): Invoke Linux fallbacks also on Linux systems that have neither nor . --- ChangeLog | 6 ++++++ lib/boot-time.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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: */ -- 2.39.5