Skip to contentSkip to conversation

plugins: Add missing 'qemu/qht.h' header

PATCH In review Philippe Mathieu-Daudé 1 participant 2 messages May 24, 2021 – Jun 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 plugins: Add missing 'qemu/qht.h' header

When building a plugin we get:

cc ... -c ../plugins/api.c
In file included from ../plugins/api.c:43:
../plugins/plugin.h:45:16: error: field 'dyn_cb_arr_ht' has incomplete type

       struct qht dyn_cb_arr_ht;
                  ^~~~~~~~~~~~~

Since we expect all headers to be self-contained, add the missing "qemu/qht.h" to avoid other developers to hit the same problem.

---
 plugins/plugin.h | 1 +
 1 file changed, 1 insertion(+)
plugins/plugin.h +1 -0
index 1aa29dcaddf..55017e35819 100644
@@ -13,6 +13,7 @@
 #define _PLUGIN_INTERNAL_H_
 
 #include <gmodule.h>
+#include "qemu/qht.h"
 
 #define QEMU_PLUGIN_MIN_VERSION 0
 
Signature · 1 line
2.26.3
#1 lore raw

FWIW this patch has been merged as part of commit 824f4bac9ff ("accel/tcg: Reduce 'exec/tb-context.h' inclusion").

Quoted 29 lines · Philippe Mathieu-Daudé

When building a plugin we get:

cc ... -c ../plugins/api.c
In file included from ../plugins/api.c:43:
../plugins/plugin.h:45:16: error: field 'dyn_cb_arr_ht' has incomplete type

       struct qht dyn_cb_arr_ht;
                  ^~~~~~~~~~~~~

Since we expect all headers to be self-contained, add the missing "qemu/qht.h" to avoid other developers to hit the same problem.

---
 plugins/plugin.h | 1 +
 1 file changed, 1 insertion(+)
plugins/plugin.h +1 -0
index 1aa29dcaddf..55017e35819 100644
@@ -13,6 +13,7 @@
 #define _PLUGIN_INTERNAL_H_
 
 #include <gmodule.h>
+#include "qemu/qht.h"
 
 #define QEMU_PLUGIN_MIN_VERSION 0