diff options
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch | 83 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-inflate64_1.0.1.bb (renamed from meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb) | 3 | 
2 files changed, 1 insertions, 85 deletions
diff --git a/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch b/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch deleted file mode 100644 index 5391a11da0..0000000000 --- a/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch +++ /dev/null  | |||
| @@ -1,83 +0,0 @@ | |||
| 1 | From 7e3a795cbeea94b3324aa926f2b11904cb169acc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 2 Jul 2024 22:02:38 -0700 | ||
| 4 | Subject: [PATCH] Do not override 'const' qualifier | ||
| 5 | |||
| 6 | This has worked so far but with fortified system headers from | ||
| 7 | Glibc 2.40+ and clang compiler it ends up in compile errors | ||
| 8 | |||
| 9 | | In file included from /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/string.h:548: | ||
| 10 | | /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:77:66: error: pass_object_size attribute only applies to constant pointer arguments | ||
| 11 | | 77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest), | ||
| 12 | | | ^ | ||
| 13 | | /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:86:66: error: pass_object_size attribute only applies to constant pointer arguments | ||
| 14 | | 86 | __NTH (stpcpy (__fortify_clang_overload_arg (char *, __restrict, __dest), | ||
| 15 | | | ^ | ||
| 16 | | /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:96:67: error: pass_object_size attribute only applies to constant pointer arguments | ||
| 17 | | 96 | __NTH (strncpy (__fortify_clang_overload_arg (char *, __restrict, __dest), | ||
| 18 | | | ^ | ||
| 19 | | /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:107:56: error: pass_object_size attribute only applies to constant pointer arguments | ||
| 20 | | 107 | __NTH (stpncpy (__fortify_clang_overload_arg (char *, ,__dest), | ||
| 21 | | | ^ | ||
| 22 | | /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:136:66: error: pass_object_size attribute only applies to constant pointer arguments | ||
| 23 | | 136 | __NTH (strcat (__fortify_clang_overload_arg (char *, __restrict, __dest), | ||
| 24 | | | ^ | ||
| 25 | | /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:145:67: error: pass_object_size attribute only applies to constant pointer arguments | ||
| 26 | | 145 | __NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest), | ||
| 27 | | | ^ | ||
| 28 | | /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:161:67: error: pass_object_size attribute only applies to constant pointer arguments | ||
| 29 | | 161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest), | ||
| 30 | |||
| 31 | Therefore adjust needed places to use const qualifier | ||
| 32 | |||
| 33 | Upstream-Status: Submitted [https://codeberg.org/miurahr/inflate64/pulls/13] | ||
| 34 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 35 | --- | ||
| 36 | src/lib/deflate.h | 2 +- | ||
| 37 | src/lib/deflate_tree.c | 4 ++-- | ||
| 38 | src/lib/inflate64_config.h | 3 --- | ||
| 39 | 3 files changed, 3 insertions(+), 6 deletions(-) | ||
| 40 | |||
| 41 | diff --git a/src/lib/deflate.h b/src/lib/deflate.h | ||
| 42 | index 72a324f..c780be9 100644 | ||
| 43 | --- a/src/lib/deflate.h | ||
| 44 | +++ b/src/lib/deflate.h | ||
| 45 | @@ -288,6 +288,6 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, char FAR *buf, | ||
| 46 | extern const unsigned char ZLIB_INTERNAL _dist_code[]; | ||
| 47 | #endif | ||
| 48 | #endif | ||
| 49 | -extern uch ZLIB_INTERNAL length_code[]; | ||
| 50 | +extern const uch ZLIB_INTERNAL length_code[]; | ||
| 51 | |||
| 52 | #endif /* DEFLATE_H */ | ||
| 53 | diff --git a/src/lib/deflate_tree.c b/src/lib/deflate_tree.c | ||
| 54 | index 5a66139..cdee934 100644 | ||
| 55 | --- a/src/lib/deflate_tree.c | ||
| 56 | +++ b/src/lib/deflate_tree.c | ||
| 57 | @@ -78,10 +78,10 @@ local const uch bl_order[BL_CODES] | ||
| 58 | |||
| 59 | #define DIST_CODE_LEN 768 /* see definition of array dist_code below */ | ||
| 60 | |||
| 61 | -local int base_length[LENGTH_CODES]; | ||
| 62 | +local const int base_length[LENGTH_CODES]; | ||
| 63 | /* First normalized length for each code (0 = MIN_MATCH) */ | ||
| 64 | |||
| 65 | -uch length_code[BASE_MATCH-MIN_MATCH+1]; | ||
| 66 | +const uch length_code[BASE_MATCH-MIN_MATCH+1]; | ||
| 67 | /* length code for each normalized match length (0 == MIN_MATCH) */ | ||
| 68 | |||
| 69 | #if defined(GEN_TREES_H) || !defined(STDC) | ||
| 70 | diff --git a/src/lib/inflate64_config.h b/src/lib/inflate64_config.h | ||
| 71 | index 16cfd12..ade7300 100644 | ||
| 72 | --- a/src/lib/inflate64_config.h | ||
| 73 | +++ b/src/lib/inflate64_config.h | ||
| 74 | @@ -53,9 +53,6 @@ | ||
| 75 | # define FAR | ||
| 76 | #endif | ||
| 77 | |||
| 78 | -#ifndef const | ||
| 79 | -# define const | ||
| 80 | -#endif | ||
| 81 | #define z_const const | ||
| 82 | |||
| 83 | typedef unsigned char uch; | ||
diff --git a/meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb b/meta-python/recipes-devtools/python/python3-inflate64_1.0.1.bb index 7804152d94..841c9239a5 100644 --- a/meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb +++ b/meta-python/recipes-devtools/python/python3-inflate64_1.0.1.bb  | |||
| @@ -6,8 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | |||
| 6 | 6 | ||
| 7 | inherit python_setuptools_build_meta pypi | 7 | inherit python_setuptools_build_meta pypi | 
| 8 | 8 | ||
| 9 | SRC_URI += "file://0001-Do-not-override-const-qualifier.patch" | 9 | SRC_URI[sha256sum] = "3b1c83c22651b5942b35829df526e89602e494192bf021e0d7d0b600e76c429d" | 
| 10 | SRC_URI[sha256sum] = "3278827b803cf006a1df251f3e13374c7d26db779e5a33329cc11789b804bc2d" | ||
| 11 | 10 | ||
| 12 | DEPENDS += "python3-setuptools-scm-native" | 11 | DEPENDS += "python3-setuptools-scm-native" | 
| 13 | 12 | ||
