]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
domain_logcontext: Don't assume remote driver is always available
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 15 Jan 2026 14:31:54 +0000 (15:31 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 15 Jan 2026 14:51:50 +0000 (15:51 +0100)
Some functions inside of domain_logcontext.c call virLogManager
APIs. But that one is available only when remote driver is
enabled. Therefore, make domain_logcontext.c conditional, just
like log_manager.c is: if config.has('WITH_REMOTE').

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/842
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/hypervisor/meson.build
src/libvirt_logging.syms
src/libvirt_private.syms

index c32703af8829daec4706488345355f97f80d6c21..91eaefbebcfbad339b5d5d96e0239633056af3dd 100644 (file)
@@ -2,11 +2,16 @@ hypervisor_sources = [
   'domain_cgroup.c',
   'domain_driver.c',
   'domain_interface.c',
-  'domain_logcontext.c',
   'virclosecallbacks.c',
   'virhostdev.c',
 ]
 
+if conf.has('WITH_REMOTE')
+  hypervisor_sources += [
+    'domain_logcontext.c'
+  ]
+endif
+
 stateful_driver_source_files += files(hypervisor_sources)
 
 hypervisor_lib = static_library(
index e2a1a7109f81346ec4a09051730f2bf0f326e1ed..5e867703cb0b817a5764419e42afdba3ad840024 100644 (file)
@@ -3,6 +3,13 @@
 #
 
 
+# hypervisor/domain_logcontext.h
+domainLogContextGetWriteFD;
+domainLogContextMarkPosition;
+domainLogContextNew;
+domainLogContextReadFiltered;
+domainLogContextWrite;
+
 # logging/log_manager.h
 virLogManagerDomainAppendMessage;
 virLogManagerDomainGetLogFilePosition;
index 4e57e4a8f6aed5b0939dbbbea864987ac370a454..51f4d6db24d43181b27d5c520acfa681d63cd36f 100644 (file)
@@ -1695,13 +1695,6 @@ virDomainInterfaceStopDevice;
 virDomainInterfaceStopDevices;
 virDomainInterfaceVportRemove;
 
-# hypervisor/domain_logcontext.h
-domainLogContextGetWriteFD;
-domainLogContextMarkPosition;
-domainLogContextNew;
-domainLogContextReadFiltered;
-domainLogContextWrite;
-
 # hypervisor/virclosecallbacks.h
 virCloseCallbacksDomainAdd;
 virCloseCallbacksDomainAlloc;