diff options
| -rw-r--r-- | meta-oe/recipes-support/onig/onig/5f1408dee4a01dee60c4cd67f2e2e46484ef50a5.patch | 138 | ||||
| -rw-r--r-- | meta-oe/recipes-support/onig/onig_6.9.9.bb | 1 |
2 files changed, 139 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/onig/onig/5f1408dee4a01dee60c4cd67f2e2e46484ef50a5.patch b/meta-oe/recipes-support/onig/onig/5f1408dee4a01dee60c4cd67f2e2e46484ef50a5.patch new file mode 100644 index 0000000000..f0683c2ebd --- /dev/null +++ b/meta-oe/recipes-support/onig/onig/5f1408dee4a01dee60c4cd67f2e2e46484ef50a5.patch | |||
| @@ -0,0 +1,138 @@ | |||
| 1 | From 5f1408dee4a01dee60c4cd67f2e2e46484ef50a5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "K.Kosako" <kkosako0@gmail.com> | ||
| 3 | Date: Mon, 18 Nov 2024 00:18:12 +0900 | ||
| 4 | Subject: [PATCH] fix #312: Build failure with GCC 15 (C23) | ||
| 5 | |||
| 6 | --- | ||
| 7 | src/regparse.c | 44 ++++++++++++++++++++++++++++++++++++-------- | ||
| 8 | src/st.h | 9 +-------- | ||
| 9 | 2 files changed, 37 insertions(+), 16 deletions(-) | ||
| 10 | |||
| 11 | Upstream-Status: Backport [5f1408dee4a01dee60c4cd67f2e2e46484ef50a5] | ||
| 12 | Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 13 | |||
| 14 | diff --git a/src/regparse.c b/src/regparse.c | ||
| 15 | index 24bcbaac..9acdd6e2 100644 | ||
| 16 | --- a/src/regparse.c | ||
| 17 | +++ b/src/regparse.c | ||
| 18 | @@ -793,8 +793,13 @@ onig_print_names(FILE* fp, regex_t* reg) | ||
| 19 | #endif /* ONIG_DEBUG */ | ||
| 20 | |||
| 21 | static int | ||
| 22 | -i_free_name_entry(UChar* key, NameEntry* e, void* arg ARG_UNUSED) | ||
| 23 | +i_free_name_entry(st_data_t akey, st_data_t ae, st_data_t arg ARG_UNUSED) | ||
| 24 | { | ||
| 25 | + UChar* key; | ||
| 26 | + NameEntry* e; | ||
| 27 | + | ||
| 28 | + key = (UChar* )akey; | ||
| 29 | + e = (NameEntry* )ae; | ||
| 30 | xfree(e->name); | ||
| 31 | if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs); | ||
| 32 | xfree(key); | ||
| 33 | @@ -850,8 +855,14 @@ typedef struct { | ||
| 34 | } INamesArg; | ||
| 35 | |||
| 36 | static int | ||
| 37 | -i_names(UChar* key ARG_UNUSED, NameEntry* e, INamesArg* arg) | ||
| 38 | +i_names(st_data_t key ARG_UNUSED, st_data_t ae, st_data_t aarg) | ||
| 39 | { | ||
| 40 | + NameEntry* e; | ||
| 41 | + INamesArg* arg; | ||
| 42 | + | ||
| 43 | + e = (NameEntry* )ae; | ||
| 44 | + arg = (INamesArg* )aarg; | ||
| 45 | + | ||
| 46 | int r = (*(arg->func))(e->name, | ||
| 47 | e->name + e->name_len, | ||
| 48 | e->back_num, | ||
| 49 | @@ -883,9 +894,14 @@ onig_foreach_name(regex_t* reg, | ||
| 50 | } | ||
| 51 | |||
| 52 | static int | ||
| 53 | -i_renumber_name(UChar* key ARG_UNUSED, NameEntry* e, GroupNumMap* map) | ||
| 54 | +i_renumber_name(st_data_t key ARG_UNUSED, st_data_t ae, st_data_t amap) | ||
| 55 | { | ||
| 56 | int i; | ||
| 57 | + NameEntry* e; | ||
| 58 | + GroupNumMap* map; | ||
| 59 | + | ||
| 60 | + e = (NameEntry* )ae; | ||
| 61 | + map = (GroupNumMap* )amap; | ||
| 62 | |||
| 63 | if (e->back_num > 1) { | ||
| 64 | for (i = 0; i < e->back_num; i++) { | ||
| 65 | @@ -1374,9 +1390,14 @@ static int CalloutNameIDCounter; | ||
| 66 | #ifdef USE_ST_LIBRARY | ||
| 67 | |||
| 68 | static int | ||
| 69 | -i_free_callout_name_entry(st_callout_name_key* key, CalloutNameEntry* e, | ||
| 70 | - void* arg ARG_UNUSED) | ||
| 71 | +i_free_callout_name_entry(st_data_t akey, st_data_t ae, st_data_t arg ARG_UNUSED) | ||
| 72 | { | ||
| 73 | + st_callout_name_key* key; | ||
| 74 | + CalloutNameEntry* e; | ||
| 75 | + | ||
| 76 | + key = (st_callout_name_key* )akey; | ||
| 77 | + e = (CalloutNameEntry* )ae; | ||
| 78 | + | ||
| 79 | if (IS_NOT_NULL(e)) { | ||
| 80 | xfree(e->name); | ||
| 81 | } | ||
| 82 | @@ -1870,10 +1891,14 @@ typedef intptr_t CalloutTagVal; | ||
| 83 | #define CALLOUT_TAG_LIST_FLAG_TAG_EXIST (1<<0) | ||
| 84 | |||
| 85 | static int | ||
| 86 | -i_callout_callout_list_set(UChar* key, CalloutTagVal e, void* arg) | ||
| 87 | +i_callout_callout_list_set(st_data_t key ARG_UNUSED, st_data_t ae, st_data_t arg) | ||
| 88 | { | ||
| 89 | int num; | ||
| 90 | - RegexExt* ext = (RegexExt* )arg; | ||
| 91 | + CalloutTagVal e; | ||
| 92 | + RegexExt* ext; | ||
| 93 | + | ||
| 94 | + e = (CalloutTagVal )ae; | ||
| 95 | + ext = (RegexExt* )arg; | ||
| 96 | |||
| 97 | num = (int )e - 1; | ||
| 98 | ext->callout_list[num].flag |= CALLOUT_TAG_LIST_FLAG_TAG_EXIST; | ||
| 99 | @@ -1926,8 +1951,11 @@ onig_callout_tag_is_exist_at_callout_num(regex_t* reg, int callout_num) | ||
| 100 | } | ||
| 101 | |||
| 102 | static int | ||
| 103 | -i_free_callout_tag_entry(UChar* key, CalloutTagVal e, void* arg ARG_UNUSED) | ||
| 104 | +i_free_callout_tag_entry(st_data_t akey, st_data_t e ARG_UNUSED, st_data_t arg ARG_UNUSED) | ||
| 105 | { | ||
| 106 | + UChar* key; | ||
| 107 | + | ||
| 108 | + key = (UChar* )akey; | ||
| 109 | xfree(key); | ||
| 110 | return ST_DELETE; | ||
| 111 | } | ||
| 112 | diff --git a/src/st.h b/src/st.h | ||
| 113 | index 5efee8bb..70798dc5 100644 | ||
| 114 | --- a/src/st.h | ||
| 115 | +++ b/src/st.h | ||
| 116 | @@ -34,13 +34,6 @@ enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK}; | ||
| 117 | #ifndef _ | ||
| 118 | # define _(args) args | ||
| 119 | #endif | ||
| 120 | -#ifndef ANYARGS | ||
| 121 | -# ifdef __cplusplus | ||
| 122 | -# define ANYARGS ... | ||
| 123 | -# else | ||
| 124 | -# define ANYARGS | ||
| 125 | -# endif | ||
| 126 | -#endif | ||
| 127 | |||
| 128 | st_table *st_init_table _((struct st_hash_type *)); | ||
| 129 | st_table *st_init_table_with_size _((struct st_hash_type *, int)); | ||
| 130 | @@ -52,7 +45,7 @@ int st_delete _((st_table *, st_data_t *, st_data_t *)); | ||
| 131 | int st_delete_safe _((st_table *, st_data_t *, st_data_t *, st_data_t)); | ||
| 132 | int st_insert _((st_table *, st_data_t, st_data_t)); | ||
| 133 | int st_lookup _((st_table *, st_data_t, st_data_t *)); | ||
| 134 | -int st_foreach _((st_table *, int (*)(ANYARGS), st_data_t)); | ||
| 135 | +int st_foreach _((st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t)); | ||
| 136 | void st_add_direct _((st_table *, st_data_t, st_data_t)); | ||
| 137 | void st_free_table _((st_table *)); | ||
| 138 | void st_cleanup_safe _((st_table *, st_data_t)); | ||
diff --git a/meta-oe/recipes-support/onig/onig_6.9.9.bb b/meta-oe/recipes-support/onig/onig_6.9.9.bb index b29437db1e..b545fc7596 100644 --- a/meta-oe/recipes-support/onig/onig_6.9.9.bb +++ b/meta-oe/recipes-support/onig/onig_6.9.9.bb | |||
| @@ -11,6 +11,7 @@ SRC_URI = "\ | |||
| 11 | https://github.com/kkos/oniguruma/releases/download/v${PV}/${BP}.tar.gz \ | 11 | https://github.com/kkos/oniguruma/releases/download/v${PV}/${BP}.tar.gz \ |
| 12 | file://0001-build-don-t-link-against-host-system-libraries.patch \ | 12 | file://0001-build-don-t-link-against-host-system-libraries.patch \ |
| 13 | file://0002-build-enable-serial-tests-automake-option-for-ptest.patch \ | 13 | file://0002-build-enable-serial-tests-automake-option-for-ptest.patch \ |
| 14 | file://5f1408dee4a01dee60c4cd67f2e2e46484ef50a5.patch \ | ||
| 14 | file://run-ptest \ | 15 | file://run-ptest \ |
| 15 | " | 16 | " |
| 16 | 17 | ||
