[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 09/16] scripts/qapi: add required system includes to visitor
From: |
marcandre . lureau |
Subject: |
[PATCH v3 09/16] scripts/qapi: add required system includes to visitor |
Date: |
Wed, 10 Aug 2022 16:48:50 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
The generated visitor code includes abort() & assert(), we shouldn't
rely on the global "-i" headers to include the necessary system headers.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
---
scripts/qapi/visit.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/qapi/visit.py b/scripts/qapi/visit.py
index 1ff464c036..4aba5ddd8a 100644
--- a/scripts/qapi/visit.py
+++ b/scripts/qapi/visit.py
@@ -342,6 +342,8 @@ def _begin_user_module(self, name: str) -> None:
visit = self._module_basename('qapi-visit', name)
self._genc.preamble_add(mcgen('''
%(include)s
+#include <assert.h>
+#include <stdlib.h>
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
--
2.37.1
- [PATCH v3 05/16] stubs: remove needless error_vprintf_unless_qmp(), (continued)
- [PATCH v3 05/16] stubs: remove needless error_vprintf_unless_qmp(), marcandre . lureau, 2022/08/10
- [PATCH v3 06/16] qapi: move QEMU-specific dispatch code in monitor, marcandre . lureau, 2022/08/10
- [PATCH v3 07/16] qapi: remove QEMU-specific monitor dependency from dispatch, marcandre . lureau, 2022/08/10
- [PATCH v3 08/16] scripts/qapi-gen: add -i option, marcandre . lureau, 2022/08/10
- [PATCH v3 13/16] qemu-common: move glib-compat.h, marcandre . lureau, 2022/08/10
- [PATCH v3 16/16] qemu-common: add error-report test, marcandre . lureau, 2022/08/10
- [PATCH v3 12/16] qemu-common: move scripts/qapi, marcandre . lureau, 2022/08/10
- [PATCH v3 14/16] qemu-common: move error-report, marcandre . lureau, 2022/08/10
- [PATCH v3 15/16] mtest2make.py: teach suite name that are just "PROJECT", marcandre . lureau, 2022/08/10
- [PATCH v3 11/16] qemu-common: introduce a common subproject, marcandre . lureau, 2022/08/10
- [PATCH v3 09/16] scripts/qapi: add required system includes to visitor,
marcandre . lureau <=
- [PATCH v3 10/16] util: move 256-by-128 division helpers to int128, marcandre . lureau, 2022/08/10