diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-03-03 10:19:36 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-06 09:52:16 +0000 |
| commit | 91275dd75bd8435ea96aacbe2477273f83abee52 (patch) | |
| tree | 097beace767688b685af9c37cca6a5bf7455d381 | |
| parent | 2393d516b7ce4a527b8cbe8c775b5d7b26a648a5 (diff) | |
| download | poky-91275dd75bd8435ea96aacbe2477273f83abee52.tar.gz | |
rpm: Fix hdr_hash function prototype
(From OE-Core rev: 0e812b4c22ac077f2defd6842f82b5c993db24c2)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/rpm/files/0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch | 35 | ||||
| -rw-r--r-- | meta/recipes-devtools/rpm/rpm_4.18.0.bb | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch b/meta/recipes-devtools/rpm/files/0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch new file mode 100644 index 0000000000..d0e637191a --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 6ef189c45b763aedac5ef57ed6a5fc125fa95b41 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 3 Mar 2023 09:54:48 -0800 | ||
| 4 | Subject: [PATCH] python: Use Py_hash_t instead of long in hdr_hash | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | python/header-py.c:744:2: error: incompatible function pointer types initializing 'hashfunc' (aka 'int (*)(struct _object *)') with an expression of type 'long (PyObject *)' (aka 'long (struct _object *)') [-Wincompatible-function-pointer-types] | ||
| 8 | | hdr_hash, /* tp_hash */ | ||
| 9 | | ^~~~~~~~ | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/2409] | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | python/header-py.c | 4 ++-- | ||
| 15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/python/header-py.c b/python/header-py.c | ||
| 18 | index 0aed0c9267..c15503f359 100644 | ||
| 19 | --- a/python/header-py.c | ||
| 20 | +++ b/python/header-py.c | ||
| 21 | @@ -316,9 +316,9 @@ static PyObject * hdr_dsOfHeader(PyObject * s) | ||
| 22 | "(Oi)", s, RPMTAG_NEVR); | ||
| 23 | } | ||
| 24 | |||
| 25 | -static long hdr_hash(PyObject * h) | ||
| 26 | +static Py_hash_t hdr_hash(PyObject * h) | ||
| 27 | { | ||
| 28 | - return (long) h; | ||
| 29 | + return (Py_hash_t) h; | ||
| 30 | } | ||
| 31 | |||
| 32 | static PyObject * hdr_reduce(hdrObject *s) | ||
| 33 | -- | ||
| 34 | 2.39.2 | ||
| 35 | |||
diff --git a/meta/recipes-devtools/rpm/rpm_4.18.0.bb b/meta/recipes-devtools/rpm/rpm_4.18.0.bb index 61e395a9d0..be81c3eb08 100644 --- a/meta/recipes-devtools/rpm/rpm_4.18.0.bb +++ b/meta/recipes-devtools/rpm/rpm_4.18.0.bb | |||
| @@ -39,6 +39,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.18.x;protoc | |||
| 39 | file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ | 39 | file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \ |
| 40 | file://0001-configure.ac-add-linux-gnux32-variant-to-triplet-han.patch \ | 40 | file://0001-configure.ac-add-linux-gnux32-variant-to-triplet-han.patch \ |
| 41 | file://fifofix.patch \ | 41 | file://fifofix.patch \ |
| 42 | file://0001-python-Use-Py_hash_t-instead-of-long-in-hdr_hash.patch \ | ||
| 42 | " | 43 | " |
| 43 | 44 | ||
| 44 | PE = "1" | 45 | PE = "1" |
