mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virhostuptime: Add linux stub for musl
When we want to know the boot timestamp of the host, we can call virHostGetBootTime(). Under the hood, it uses getutxid() which is defined by POSIX and properly check for in configure. However, musl took a path where it declares the function but instead of providing any useful implementation it returns NULL meaning "no record found". If that's the case, use our second best option - /proc/uptime and a bit of maths. https://bugzilla.redhat.com/show_bug.cgi?id=1760885 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
@@ -250,6 +250,7 @@
|
||||
@SRCDIR@/src/util/virhostcpu.c
|
||||
@SRCDIR@/src/util/virhostdev.c
|
||||
@SRCDIR@/src/util/virhostmem.c
|
||||
@SRCDIR@/src/util/virhostuptime.c
|
||||
@SRCDIR@/src/util/viridentity.c
|
||||
@SRCDIR@/src/util/virinitctl.c
|
||||
@SRCDIR@/src/util/viriptables.c
|
||||
|
||||
Reference in New Issue
Block a user