From 3eab3c8cb7d6a4aa4313c47931c24bc23dee46ce Mon Sep 17 00:00:00 2001 From: znley Date: Thu, 8 Aug 2024 11:54:17 +0000 Subject: [PATCH] main/freeswitch: fix gcc14 compatibility --- main/freeswitch/APKBUILD | 2 ++ main/freeswitch/gcc14.patch | 48 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 main/freeswitch/gcc14.patch diff --git a/main/freeswitch/APKBUILD b/main/freeswitch/APKBUILD index 346bdd8caa1..426f613a281 100644 --- a/main/freeswitch/APKBUILD +++ b/main/freeswitch/APKBUILD @@ -73,6 +73,7 @@ source="https://files.freeswitch.org/freeswitch-releases/freeswitch-$pkgver.-rel libvpx-fix-arm-float-abi.patch disable-Werror.patch python-3.10.patch + gcc14.patch modules.conf freeswitch.confd freeswitch.initd @@ -232,6 +233,7 @@ sha512sums=" 98a53f289c3647cafd05b6f847da0504a838a6e06545c133c10fb058c2d941e6bccf2820f44649fc25f94a4a5b7c1280eaee91098e8110f96ed3342c1cb4346c libvpx-fix-arm-float-abi.patch 16e9208fca7f0a1985dd01ec38ddabb6a79da83ad6ab004bb66de528ac45f02fadaddc50a9f228e1aa38fae213fa5af0ca858b7af629b67a7d654339f813a68c disable-Werror.patch 4739be0c1c6783ace2bd10f7573b1ca86be013d21a7f973b5fd348c98fb9ed1a548baacee6bb65b7501251106c8dbd7266997f8699d2d7070a2bd7efe145b866 python-3.10.patch +c71076ebf0cb40f8dc9e3edf9795035a38a619d3e4f0ee143b6c1a86d6cdb3daa3832181af68c4bf48465206acc905432eb2d0211a42e0a25b8c84b886c40c0e gcc14.patch b2e4e5982e600098e00d5dce801f6159dc3d0765e9de5acc05492b4c811f399b4302c4c6a91d9788d8464d46d9c7a64b70a345130b97aa5a73da41acc57f67de modules.conf a585f6411185a26206137a1ad97a06fd6c73e80c5439e9be45eabfa70e7a83120169ba882971fcd328436c8e0242cbd664170b80754ea2846021689baf1f1595 freeswitch.confd 643d0a2e43f5d3bf3b99fcb6f6422302cb4b74a95eccf844eafb100b15aa9856b4ff41f112d6637255c2e9e2bec9fedc9a9215dfff214dfb83b52eae16b71dca freeswitch.initd diff --git a/main/freeswitch/gcc14.patch b/main/freeswitch/gcc14.patch new file mode 100644 index 00000000000..b32edd00b97 --- /dev/null +++ b/main/freeswitch/gcc14.patch @@ -0,0 +1,48 @@ +diff --git a/src/mod/languages/mod_perl/mod_perl.c b/src/mod/languages/mod_perl/mod_perl.c +index 01795fa..d5c4d33 100644 +--- a/src/mod/languages/mod_perl/mod_perl.c ++++ b/src/mod/languages/mod_perl/mod_perl.c +@@ -45,6 +45,7 @@ + #include + #include + #include ++#include "mod_perl_extra.h" + static char *embedding[] = { "", "-e", "0", NULL }; + EXTERN_C void xs_init(pTHX); + +diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c +index 8e49462..a11ebb3 100644 +--- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c ++++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c +@@ -359,7 +359,7 @@ static abyss_bool is_authorized(const TSession * r, const char *command) + + err = 686; + +- if (!user_attributes(user, domain_name, NULL, NULL, NULL, &allowed_commands)) { ++ if (!user_attributes(user, domain_name, NULL, NULL, NULL, (const char **)&allowed_commands)) { + goto end; + } + +@@ -944,7 +944,7 @@ abyss_bool handler_hook(TSession * r) + break; + } + +- ConnRead(r->connP, 2000, NULL, NULL, &readError); ++ ConnRead(r->connP, 2000, NULL, NULL, (const char **)&readError); + if (readError) { + succeeded = FALSE; + free(readError); + +diff --git a/src/mod/languages/mod_perl/mod_perl.c b/src/mod/languages/mod_perl/mod_perl.c +index f3d7b47..0582045 100644 +--- a/src/mod/languages/mod_perl/mod_perl.c ++++ b/src/mod/languages/mod_perl/mod_perl.c +@@ -208,7 +208,7 @@ static perl_parse_and_execute(PerlInterpreter * my_perl, char *input_code, char + + + +-static void perl_function(switch_core_session_t *session, char *data) ++static void perl_function(switch_core_session_t *session, const char *data) + { + char *uuid = switch_core_session_get_uuid(session); + PerlInterpreter *my_perl = clone_perl();