diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-10 20:18:34 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-10 20:18:34 +0100 |
commit | f1cd8f3514f8b9fbc1cc9cfe0dd08a8cb258e87a (patch) | |
tree | e16b2f573ffa54d21accbf0dfc3647b47b0578c8 /dev-python/scandir/files | |
parent | e9c5cd3a9230f2f3f5980a5ca0c4ec20c099c7ed (diff) |
gentoo auto-resync : 10:08:2022 - 20:18:34
Diffstat (limited to 'dev-python/scandir/files')
-rw-r--r-- | dev-python/scandir/files/scandir-1.10.0-python3.9.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-python/scandir/files/scandir-1.10.0-python3.9.patch b/dev-python/scandir/files/scandir-1.10.0-python3.9.patch new file mode 100644 index 000000000000..c8683c1c6b9b --- /dev/null +++ b/dev-python/scandir/files/scandir-1.10.0-python3.9.patch @@ -0,0 +1,62 @@ +https://github.com/benhoyt/scandir/commit/3396aa4155ffde8600a0e9ca50d5872569169b5d + +From 3396aa4155ffde8600a0e9ca50d5872569169b5d Mon Sep 17 00:00:00 2001 +From: Ben Hoyt <benhoyt@gmail.com> +Date: Mon, 24 Jan 2022 08:44:07 +1300 +Subject: [PATCH] Add Python 3.10 to tests (#137) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix PyStructSequence_UnnamedField build issues on Python 3.9/3.10 + +_scandir.c:663:7: error: conflicting type qualifiers for ‘PyStructSequence_UnnamedField’ + 663 | char *PyStructSequence_UnnamedField = "unnamed field"; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In file included from /usr/local/include/python3.10/Python.h:127, + from _scandir.c:14: +/usr/local/include/python3.10/structseq.h:22:27: note: previous declaration of ‘PyStructSequence_UnnamedField’ was here + 22 | extern const char * const PyStructSequence_UnnamedField; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Fixes https://github.com/benhoyt/scandir/pull/137 +--- + _scandir.c | 10 +++++----- + scandir.py | 2 +- + 3 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/_scandir.c b/_scandir.c +index 6cc28c8..433483f 100644 +--- a/_scandir.c ++++ b/_scandir.c +@@ -660,7 +660,7 @@ _pystat_fromstructstat(STRUCT_STAT *st) + return v; + } + +-char *PyStructSequence_UnnamedField = "unnamed field"; ++static char *scandir_unnamed_field = "unnamed field"; + + PyDoc_STRVAR(stat_result__doc__, + "stat_result: Result from stat, fstat, or lstat.\n\n\ +@@ -681,7 +681,7 @@ static PyStructSequence_Field stat_result_fields[] = { + {"st_uid", "user ID of owner"}, + {"st_gid", "group ID of owner"}, + {"st_size", "total size, in bytes"}, +- /* The NULL is replaced with PyStructSequence_UnnamedField later. */ ++ /* The NULL is replaced with scandir_unnamed_field later. */ + {NULL, "integer time of last access"}, + {NULL, "integer time of last modification"}, + {NULL, "integer time of last change"}, +@@ -1817,9 +1817,9 @@ init_scandir(void) + if (!billion) + INIT_ERROR; + +- stat_result_desc.fields[7].name = PyStructSequence_UnnamedField; +- stat_result_desc.fields[8].name = PyStructSequence_UnnamedField; +- stat_result_desc.fields[9].name = PyStructSequence_UnnamedField; ++ stat_result_desc.fields[7].name = scandir_unnamed_field; ++ stat_result_desc.fields[8].name = scandir_unnamed_field; ++ stat_result_desc.fields[9].name = scandir_unnamed_field; + PyStructSequence_InitType(&StatResultType, &stat_result_desc); + structseq_new = StatResultType.tp_new; + StatResultType.tp_new = statresult_new; |