[PATCH] libfdt: Fix build with python 3.10

Michal Suchanek msuchanek at suse.de
Thu Oct 13 22:43:41 CEST 2022


Python 3.10 requires defining PY_SSIZE_T_CLEAN. This will be fixed in
swig 4.10 but it is not clear when it will be released. There was a
warning since python 3.8.

Link: https://github.com/swig/swig/pull/2277

Signed-off-by: Michal Suchanek <msuchanek at suse.de>
---

 scripts/dtc/pylibfdt/libfdt.i_shipped | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
index 27c29ea260..56cc5d48f4 100644
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
@@ -7,6 +7,10 @@
 
 %module libfdt
 
+%begin %{
+#define PY_SSIZE_T_CLEAN
+%}
+
 %include <stdint.i>
 
 %{
-- 
2.37.3



More information about the U-Boot mailing list