diff mbox series

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

Message ID 20210524165226.3785324-1-f4bug@amsat.org
State New
Headers show
Series plugins: Add missing 'qemu/qht.h' header | expand

Commit Message

Philippe Mathieu-Daudé May 24, 2021, 4:52 p.m. UTC
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.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 plugins/plugin.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Philippe Mathieu-Daudé June 14, 2021, 11:17 a.m. UTC | #1
FWIW this patch has been merged as part of commit 824f4bac9ff
("accel/tcg: Reduce 'exec/tb-context.h' inclusion").

On 5/24/21 6:52 PM, Philippe Mathieu-Daudé wrote:
> 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.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  plugins/plugin.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/plugins/plugin.h b/plugins/plugin.h
> index 1aa29dcaddf..55017e35819 100644
> --- a/plugins/plugin.h
> +++ b/plugins/plugin.h
> @@ -13,6 +13,7 @@
>  #define _PLUGIN_INTERNAL_H_
>  
>  #include <gmodule.h>
> +#include "qemu/qht.h"
>  
>  #define QEMU_PLUGIN_MIN_VERSION 0
>  
>
diff mbox series

Patch

diff --git a/plugins/plugin.h b/plugins/plugin.h
index 1aa29dcaddf..55017e35819 100644
--- a/plugins/plugin.h
+++ b/plugins/plugin.h
@@ -13,6 +13,7 @@ 
 #define _PLUGIN_INTERNAL_H_
 
 #include <gmodule.h>
+#include "qemu/qht.h"
 
 #define QEMU_PLUGIN_MIN_VERSION 0