diff options
author | Eric Hameleers <alien@slackware.com> | 2021-12-21 13:18:28 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2021-12-21 13:18:28 +0000 |
commit | 6b5bd7e05becfe94c302e689006bf452f6d3f7e1 (patch) | |
tree | c219a28d05c9514637cc275d40ee3fc711455118 /device-tree-compiler/build/patches | |
parent | dc13db798c47031d6eb232372ddc9b09079cf753 (diff) | |
download | asb-6b5bd7e05becfe94c302e689006bf452f6d3f7e1.tar.gz asb-6b5bd7e05becfe94c302e689006bf452f6d3f7e1.tar.xz |
Initial revision
Diffstat (limited to 'device-tree-compiler/build/patches')
-rw-r--r-- | device-tree-compiler/build/patches/dtc_python310.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/device-tree-compiler/build/patches/dtc_python310.patch b/device-tree-compiler/build/patches/dtc_python310.patch new file mode 100644 index 00000000..174b0b0a --- /dev/null +++ b/device-tree-compiler/build/patches/dtc_python310.patch @@ -0,0 +1,28 @@ +# Backported from https://github.com/dgibson/dtc/commit/383e148b70a4 + +diff -upr dtc-1.6.1.orig/pylibfdt/libfdt.i dtc-1.6.1/pylibfdt/libfdt.i +--- dtc-1.6.1.orig/pylibfdt/libfdt.i 2021-06-08 10:00:49.000000000 +0300 ++++ dtc-1.6.1/pylibfdt/libfdt.i 2021-12-02 02:27:27.747063911 +0200 +@@ -1044,9 +1044,9 @@ typedef uint32_t fdt32_t; + $result = Py_None; + else + %#if PY_VERSION_HEX >= 0x03000000 +- $result = Py_BuildValue("y#", $1, *arg4); ++ $result = Py_BuildValue("y#", $1, (Py_ssize_t)*arg4); + %#else +- $result = Py_BuildValue("s#", $1, *arg4); ++ $result = Py_BuildValue("s#", $1, (Py_ssize_t)*arg4); + %#endif + } + +diff -upr dtc-1.6.1.orig/pylibfdt/setup.py dtc-1.6.1/pylibfdt/setup.py +--- dtc-1.6.1.orig/pylibfdt/setup.py 2021-06-08 10:00:49.000000000 +0300 ++++ dtc-1.6.1/pylibfdt/setup.py 2021-12-02 02:28:05.914736698 +0200 +@@ -42,6 +42,7 @@ def get_version(): + libfdt_module = Extension( + '_libfdt', + sources=[os.path.join(srcdir, 'libfdt.i')], ++ define_macros=[('PY_SSIZE_T_CLEAN', None)], + include_dirs=[os.path.join(srcdir, '../libfdt')], + libraries=['fdt'], + library_dirs=[os.path.join(top_builddir, 'libfdt')], |