[libvirt PATCH 0/2] header fixes

Pavel Hrdina (2): remote: remove duplicated header src/logging: no need to include log_protocol.h in log_manager.h src/logging/log_manager.h | 2 -- src/qemu/qemu_command.c | 1 + src/remote/remote_daemon_dispatch.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) -- 2.26.2

We already include viraccessapicheck.h few lines above. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/remote/remote_daemon_dispatch.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index c91b5d3293..dacfa4e9fb 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -50,7 +50,6 @@ #include "virpolkit.h" #include "virthreadjob.h" #include "configmake.h" -#include "access/viraccessapicheck.h" #define VIR_FROM_THIS VIR_FROM_RPC -- 2.26.2

The header log_manager.h doesn't use anything from log_protocol.h and the only other place than logging using log_protocol.h is qemu_command.c where we can include log_protocol.h directly to have enum value VIR_LOG_MANAGER_PROTOCOL_DOMAIN_OPEN_LOG_FILE_TRUNCATE available. Fixes race-condition compilation error with meson: In file included from ../tests/qemuhotplugmock.c:21: In file included from ../src/qemu/qemu_hotplug.h:25: In file included from ../src/qemu/qemu_domain.h:42: ../src/logging/log_manager.h:25:10: fatal error: 'logging/log_protocol.h' file not found ^~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Reported-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/logging/log_manager.h | 2 -- src/qemu/qemu_command.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/logging/log_manager.h b/src/logging/log_manager.h index cca1573841..ae3ae2b4c5 100644 --- a/src/logging/log_manager.h +++ b/src/logging/log_manager.h @@ -22,8 +22,6 @@ #include "internal.h" -#include "logging/log_protocol.h" - typedef struct _virLogManager virLogManager; typedef virLogManager *virLogManagerPtr; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0655d8359d..01812cd39b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -64,6 +64,7 @@ # include <linux/capability.h> #endif #include "logging/log_manager.h" +#include "logging/log_protocol.h" #include "virutil.h" #include <sys/stat.h> -- 2.26.2

On a Tuesday in 2020, Pavel Hrdina wrote:
Pavel Hrdina (2): remote: remove duplicated header src/logging: no need to include log_protocol.h in log_manager.h
src/logging/log_manager.h | 2 -- src/qemu/qemu_command.c | 1 + src/remote/remote_daemon_dispatch.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko
-
Pavel Hrdina