[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
boot-time: Make it work on Adélie Linux
|
From: |
Bruno Haible |
|
Subject: |
boot-time: Make it work on Adélie Linux |
|
Date: |
Thu, 16 Nov 2023 14:33:34 +0100 |
Adélie Linux is one of the worst distros I have seen in the last few years.
(The 'live' installer CD-ROM does not work. The package search website has an
incomplete list of packages. Missing dependencies between essential packages.
Lots of silly behaviour everywhere.)
Nevertheless, the 'boot-time' module should work on this platform.
Done through this patch (which makes get_boot_time() look at the time stamp
of the /var/run/utmp file):
2023-11-16 Bruno Haible <bruno@clisp.org>
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 <utmp.h> nor <utmpx.h>.
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: */
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- boot-time: Make it work on Adélie Linux,
Bruno Haible <=