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 

Change-Id: Ib3dd3003352f6c3155bb47d69ecb7a1b02f4647a
(cherry picked from commit 4ebebe08d8)
(cherry picked from commit b75c598c52)
mr12.5.1
Richard Fuchs 7 months ago
parent ff9610eb6e
commit cfb9342aa8

@ -101,7 +101,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;

@ -61,7 +61,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;
@ -134,7 +134,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();
}

@ -32,6 +32,12 @@ int pcre2_multi_match(pcre2_code *, const char *, unsigned int, parse_func, void
INLINE void strmove(char **, char **);
INLINE void strdupfree(char **, const char *);
#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