diff options
Diffstat (limited to 'recipes-kernel/dtc/files/ssize.patch')
-rw-r--r-- | recipes-kernel/dtc/files/ssize.patch | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/recipes-kernel/dtc/files/ssize.patch b/recipes-kernel/dtc/files/ssize.patch deleted file mode 100644 index 3156896c..00000000 --- a/recipes-kernel/dtc/files/ssize.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | Python 3.10 has made it mandatory that the 'string+length` formats use ssize_t | ||
2 | instead of int, so define the magic symbol and upcast the ints from the libfdt | ||
3 | API to ssize_t. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
7 | |||
8 | diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i | ||
9 | index 51ee801..075ef70 100644 | ||
10 | --- a/pylibfdt/libfdt.i | ||
11 | +++ b/pylibfdt/libfdt.i | ||
12 | @@ -1044,9 +1044,9 @@ typedef uint32_t fdt32_t; | ||
13 | $result = Py_None; | ||
14 | else | ||
15 | %#if PY_VERSION_HEX >= 0x03000000 | ||
16 | - $result = Py_BuildValue("y#", $1, *arg4); | ||
17 | + $result = Py_BuildValue("y#", $1, (Py_ssize_t)*arg4); | ||
18 | %#else | ||
19 | - $result = Py_BuildValue("s#", $1, *arg4); | ||
20 | + $result = Py_BuildValue("s#", $1, (Py_ssize_t)*arg4); | ||
21 | %#endif | ||
22 | } | ||
23 | |||
24 | diff --git a/pylibfdt/setup.py b/pylibfdt/setup.py | ||
25 | index ef40f15..88ff7d1 100755 | ||
26 | --- a/pylibfdt/setup.py | ||
27 | +++ b/pylibfdt/setup.py | ||
28 | @@ -42,6 +42,7 @@ def get_version(): | ||
29 | libfdt_module = Extension( | ||
30 | '_libfdt', | ||
31 | sources=[os.path.join(srcdir, 'libfdt.i')], | ||
32 | + define_macros=[('PY_SSIZE_T_CLEAN', None)], | ||
33 | include_dirs=[os.path.join(srcdir, '../libfdt')], | ||
34 | libraries=['fdt'], | ||
35 | library_dirs=[os.path.join(top_builddir, 'libfdt')], | ||