Commit 977d5b5018 for qemu.org
commit 977d5b5018f13f2a488c0420755f612fc8faf1a0
Author: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Date: Wed Aug 12 10:57:02 2026 +0200
qapi/qmp-dispatch: Include 'qemu/aio-wait.h' and 'monitor/monitor.h'
qmp-dispatch.c calls aio_wait_kick() and monitor_cur(). Include the
header declaring them in order to avoid the following build failure
when refactoring unrelated headers:
../qapi/qmp-dispatch.c:126:12: error: call to undeclared function 'monitor_cur'
126 | assert(monitor_cur() == NULL);
| ^
../qapi/qmp-dispatch.c:141:5: error: call to undeclared function 'aio_wait_kick'
141 | aio_wait_kick();
| ^
Fixes: 41725fa7eda ("qmp: Call monitor_set_cur() only in qmp_dispatch()")
Fixes: fc1a2ec7da5 ("monitor: Fix deadlock in monitor_cleanup")
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20260812211708.92824-5-philmd@oss.qualcomm.com>
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index e3897d5197..965cad6499 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -14,6 +14,7 @@
#include "qemu/osdep.h"
#include "qemu/aio.h"
+#include "qemu/aio-wait.h"
#include "qapi/compat-policy.h"
#include "qapi/error.h"
#include "qapi/qmp-registry.h"
@@ -24,6 +25,7 @@
#include "qobject/qbool.h"
#include "qemu/coroutine.h"
#include "qemu/main-loop.h"
+#include "monitor/monitor.h"
Visitor *qobject_input_visitor_new_qmp(QObject *obj)
{