Skip to contentSkip to conversation

libfdt: Fix build with python 3.10

PATCH In review Michal Suchanek 2 participants 3 messages Oct 13, 2022 – Oct 22, 2022 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libfdt: Fix build with python 3.10

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.

---

 scripts/dtc/pylibfdt/libfdt.i_shipped | 4 ++++
 1 file changed, 4 insertions(+)
scripts/dtc/pylibfdt/libfdt.i_shipped +4 -0
index 27c29ea260..56cc5d48f4 100644
@@ -7,6 +7,10 @@
 
 %module libfdt
 
+%begin %{
+#define PY_SSIZE_T_CLEAN
+%}
+
 %include <stdint.i>
 
 %{
Signature · 1 line
2.37.3
Reviewed-by
#2 lore raw
Quoted 5 lines · Michal Suchanek

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.

Quoted 8 lines

---

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

Applied to u-boot-dm, thanks!