libfdt: Fix build with python 3.10
authorMichal Suchanek <msuchanek@suse.de>
Thu, 13 Oct 2022 20:43:41 +0000 (22:43 +0200)
committerSimon Glass <sjg@chromium.org>
Sat, 29 Oct 2022 13:36:33 +0000 (07:36 -0600)
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@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
scripts/dtc/pylibfdt/libfdt.i_shipped

index 27c29ea2603af02430c25178ef74d892b03041f0..56cc5d48f4f983f47faa48f2a28affc458887b41 100644 (file)
@@ -7,6 +7,10 @@
 
 %module libfdt
 
+%begin %{
+#define PY_SSIZE_T_CLEAN
+%}
+
 %include <stdint.i>
 
 %{