From: Michal Privoznik Date: Wed, 8 Dec 2021 11:14:44 +0000 (+0100) Subject: logging: Build log manager only when RPC is available X-Git-Tag: v8.0.0-rc1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7ccae7f1f6f62c311620c7649c7669ebbec0031;p=thirdparty%2Flibvirt.git logging: Build log manager only when RPC is available The logging manager is very closely tied to RPC. If we are building without RPC support there's not much use for the manager, in fact it fails to build. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/src/libvirt_logging.syms b/src/libvirt_logging.syms new file mode 100644 index 0000000000..e2a1a7109f --- /dev/null +++ b/src/libvirt_logging.syms @@ -0,0 +1,18 @@ +# +# Domain logging specific symbols +# + + +# logging/log_manager.h +virLogManagerDomainAppendMessage; +virLogManagerDomainGetLogFilePosition; +virLogManagerDomainOpenLogFile; +virLogManagerDomainReadLogFile; +virLogManagerFree; +virLogManagerNew; + + +# Let emacs know we want case-insensitive sorting +# Local Variables: +# sort-fold-case: t +# End: diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index f5a816b002..3a8f298dc8 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1667,15 +1667,6 @@ virLockManagerPluginUsesState; virLockManagerRelease; -# logging/log_manager.h -virLogManagerDomainAppendMessage; -virLogManagerDomainGetLogFilePosition; -virLogManagerDomainOpenLogFile; -virLogManagerDomainReadLogFile; -virLogManagerFree; -virLogManagerNew; - - # security/security_driver.h virSecurityDriverLookup; diff --git a/src/logging/meson.build b/src/logging/meson.build index 996d4265fc..89e06a0d5a 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -32,20 +32,25 @@ log_daemon_sources = files( 'log_handler.c', ) -log_driver_lib = static_library( - 'virt_log_driver', - [ - log_driver_sources, - log_protocol_generated, - ], - dependencies: [ - rpc_dep, - src_dep, - xdr_dep, - ], -) +if conf.has('WITH_REMOTE') + log_driver_lib = static_library( + 'virt_log_driver', + [ + log_driver_sources, + log_protocol_generated, + ], + dependencies: [ + rpc_dep, + src_dep, + xdr_dep, + ], + ) -libvirt_libs += log_driver_lib + libvirt_libs += log_driver_lib + used_sym_files += 'libvirt_logging.syms' +else + sym_files += 'libvirt_logging.syms' +endif if conf.has('WITH_LIBVIRTD') log_daemon_generated = custom_target(