]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Fix stubs for virProcessGet{Stat,Sched}Info()
authorAndrea Bolognani <abologna@redhat.com>
Fri, 15 Apr 2022 13:58:27 +0000 (15:58 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 19 Apr 2022 13:43:12 +0000 (15:43 +0200)
commit8f651ad4d249b293a423f5a3866eab743d4f05a2
tree6e1a3aa97ed513c817c8ec92bc065da1fa7684ff
parent48b9a6ae31c1ec70f50b522673b748b7463554c9
util: Fix stubs for virProcessGet{Stat,Sched}Info()

Commit d73852c49962 moved the original QEMU-specific helpers to
the utils module, which resulted in build failures on non-Unix
platforms due to the unconditional use of Unix-only symbols such
as _SC_CLK_TCK.

To deal with that situation, commit d7c64453aa0e made the helpers
Linux-only and added stubs for other platforms that, when called,
would always fail with ENOSYS.

However the original helpers had been carefully written so that,
while they would only be able to produce useful output on Linux,
they would still succeed on the other Unix platforms where we
build the QEMU driver.

Restore the original behavior so that calling APIs such as
virDomainGetInfo() can once again work on FreeBSD and macOS.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/298
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virprocess.c