MT#55283 fix compilation error for pcre2 >= 10.43

The pcre2 API was changed from

	pcre2_substring_list_free(PCRE2_SPTR *)

to

	pcre2_substring_list_free(PCRE2_UCHAR **)

in 10.43. The difference is a `const` qualifier. Work around this.

Closes #1869

Change-Id: Ib3dd3003352f6c3155bb47d69ecb7a1b02f4647a
pull/1870/head
Richard Fuchs 1 year ago
parent bf0b178c4d
commit 4ebebe08d8

@ -102,7 +102,7 @@ static int control_stream_parse(struct streambuf_stream *s, char *line) {
free(output);
}
pcre2_substring_list_free((PCRE2_SPTR *) out);
pcre2_substring_list_free((SUBSTRING_FREE_ARG) out);
pcre2_match_data_free(md);
log_info_pop();
return 1;

@ -62,7 +62,7 @@ static void control_udp_incoming(struct obj *obj, struct udp_buffer *udp_buf) {
socket_sendiov(udp_buf->listener, iov, iovlen, &udp_buf->sin, &udp_buf->local_addr);
pcre2_substring_list_free((PCRE2_SPTR *) out);
pcre2_substring_list_free((SUBSTRING_FREE_ARG) out);
pcre2_match_data_free(md);
return;
@ -135,7 +135,7 @@ static void control_udp_incoming(struct obj *obj, struct udp_buffer *udp_buf) {
cookie_cache_remove(&u->cookie_cache, &cookie);
out:
pcre2_substring_list_free((PCRE2_SPTR *) out);
pcre2_substring_list_free((SUBSTRING_FREE_ARG) out);
pcre2_match_data_free(md);
log_info_pop();
}

@ -30,6 +30,12 @@ typedef bool (*parse_func)(char **, void **, void *);
int pcre2_multi_match(pcre2_code *, const char *, unsigned int, parse_func, void *, GQueue *);
#if PCRE2_MAJOR > 10 || (PCRE2_MAJOR == 10 && PCRE2_MINOR >= 43)
#define SUBSTRING_FREE_ARG PCRE2_UCHAR **
#else
#define SUBSTRING_FREE_ARG PCRE2_SPTR *
#endif
/*** GLIB HELPERS ***/

Loading…
Cancel
Save