diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2021-12-18 08:38:12 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2021-12-18 08:38:12 +0000 |
| commit | a191d0a8fc10214a7d9a29de7e58323eecae2186 (patch) | |
| tree | e132bfc2893213f06b6e6636bb7dfdc7bb7171e8 /dev-python/python-systemd/files | |
| parent | fb798ae7127929773f4b5722d7ab7647575e8521 (diff) | |
| download | baldeagleos-repo-a191d0a8fc10214a7d9a29de7e58323eecae2186.tar.gz baldeagleos-repo-a191d0a8fc10214a7d9a29de7e58323eecae2186.tar.xz baldeagleos-repo-a191d0a8fc10214a7d9a29de7e58323eecae2186.zip | |
Adding metadata
Diffstat (limited to 'dev-python/python-systemd/files')
| -rw-r--r-- | dev-python/python-systemd/files/python-systemd-234-fix-py3.10.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-python/python-systemd/files/python-systemd-234-fix-py3.10.patch b/dev-python/python-systemd/files/python-systemd-234-fix-py3.10.patch new file mode 100644 index 000000000000..52045b4475e1 --- /dev/null +++ b/dev-python/python-systemd/files/python-systemd-234-fix-py3.10.patch @@ -0,0 +1,46 @@ +From c71bbac357f0ac722e1bcb2edfa925b68cca23c9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> +Date: Thu, 12 Nov 2020 16:55:56 +0100 +Subject: [PATCH] reader: make PY_SSIZE_T_CLEAN + +--- + systemd/_reader.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/systemd/_reader.c b/systemd/_reader.c +index 8de7f6a..3b6a4d0 100644 +--- a/systemd/_reader.c ++++ b/systemd/_reader.c +@@ -18,7 +18,12 @@ + along with python-systemd; If not, see <http://www.gnu.org/licenses/>. + ***/ + ++#define PY_SSIZE_T_CLEAN ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wredundant-decls" + #include <Python.h> ++#pragma GCC diagnostic pop ++ + #include <structmember.h> + #include <datetime.h> + #include <time.h> +@@ -710,11 +715,17 @@ PyDoc_STRVAR(Reader_add_match__doc__, + "Match is a string of the form \"FIELD=value\"."); + static PyObject* Reader_add_match(Reader *self, PyObject *args, PyObject *keywds) { + char *match; +- int match_len, r; ++ Py_ssize_t match_len; ++ int r; + if (!PyArg_ParseTuple(args, "s#:add_match", &match, &match_len)) + return NULL; + +- r = sd_journal_add_match(self->j, match, match_len); ++ if (match_len > INT_MAX) { ++ set_error(-ENOBUFS, NULL, NULL); ++ return NULL; ++ } ++ ++ r = sd_journal_add_match(self->j, match, (int) match_len); + if (set_error(r, NULL, "Invalid match") < 0) + return NULL; + |
