freeswitch: clean up after uclibc* removal

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2021-03-09 21:44:27 +01:00
parent 967c9df8b2
commit 4d8e02f4af
2 changed files with 3 additions and 81 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=freeswitch
PKG_VERSION:=1.10.5
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
PKG_SOURCE:=freeswitch-$(PKG_VERSION).-release.tar.xz
@ -233,17 +233,6 @@ PKG_CONFIG_DEPENDS:= \
include $(INCLUDE_DIR)/package.mk
# iconv support
include $(INCLUDE_DIR)/nls.mk
#######################################################
# mod_gsmopen can't detect if iconv's inbuf is const. #
# #
# musl uclibc #
# libiconv-stub - - #
# libiconv-full - const #
# #
#######################################################
ifeq ($(ICONV_FULL)$(CONFIG_USE_UCLIBC),1y)
TARGET_CFLAGS+=-DFS_ICONV_INBUF_CONST
endif
FS_PERL_FEED:=$(TOPDIR)/feeds/packages/lang/perl
@ -978,7 +967,7 @@ $(eval $(call Package/freeswitch/Module,esl,Single ESL,This module adds an API f
$(eval $(call Package/freeswitch/Module,event_multicast,Multicast Event,Multicast Event System for FreeSWITCH.,))
$(eval $(call Package/freeswitch/Module,event_socket,Event socket,Sends events via a single socket. Needed for fs_cli.,))
$(eval $(call Package/freeswitch/Module,event_test,Event test,Event demo module.,))
$(eval $(call Package/freeswitch/Module,event_zmq,ZMQ event,ZMQ event module.,@!USE_UCLIBCXX))
$(eval $(call Package/freeswitch/Module,event_zmq,ZMQ event,ZMQ event module.,))
$(eval $(call Package/freeswitch/Module,expr,Expr,This module adds expr support for expression evaluation.,))
$(eval $(call Package/freeswitch/Module,fail2ban,Fail2ban logging,Provides support for Fail2ban logging.,))
$(eval $(call Package/freeswitch/Module,fifo,FIFO,This module adds a first-in first-out queue system.,))
@ -1004,7 +993,7 @@ $(eval $(call Package/freeswitch/Module,local_stream,Local stream,Connects multi
$(eval $(call Package/freeswitch/Module,logfile,File logger,Logs FreeSWITCH output to a file.,))
$(eval $(call Package/freeswitch/Module,loopback,Loopback,A loopback channel driver.,))
$(eval $(call Package/freeswitch/Module,lua,Lua,Lua language interface for FreeSWITCH.,+liblua))
$(eval $(call Package/freeswitch/Module,mariadb,MariaDB,Adds MariaDB support.,+libmariadb @!USE_UCLIBCXX))
$(eval $(call Package/freeswitch/Module,mariadb,MariaDB,Adds MariaDB support.,+libmariadb))
$(eval $(call Package/freeswitch/Module,mp4v,MP4 video passthrough,MP4 video passthrough.,))
$(eval $(call Package/freeswitch/Module,native_file,Native file,Plays files that are already encoded in the right format.,))
$(eval $(call Package/freeswitch/Module,nibblebill,Nibblebill,This module allows for real-time accounting of a cash balance and\nusing that information for call routing.,))

View file

@ -1,67 +0,0 @@
--- a/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
+++ b/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
@@ -104,6 +104,12 @@ int gettimeofday(struct timeval *tv, str
/***************/
#endif /* WIN32 */
+#if defined(FS_ICONV_INBUF_CONST)
+#define ICONV_INBUF_TYPE const char **
+#else
+#define ICONV_INBUF_TYPE char **
+#endif
+
int gsmopen_serial_init(private_t *tech_pvt, int controldevice_speed)
{
if (!tech_pvt)
@@ -2521,11 +2527,7 @@ int ucs2_to_utf8(private_t *tech_pvt, ch
DEBUGA_GSMOPEN("1 ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
-#ifdef WIN32
- iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-#else // WIN32
- iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-#endif // WIN32
+ iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
if (iconv_res == (size_t) -1) {
DEBUGA_GSMOPEN("2 ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
@@ -2560,11 +2562,7 @@ int utf8_to_iso_8859_1(private_t *tech_p
DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf8_in=%s, iso_8859_1_out=%s\n",
GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_in, iso_8859_1_out);
-#ifdef WIN32
- iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-#else // WIN32
- iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-#endif // WIN32
+ iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
if (iconv_res == (size_t) -1) {
DEBUGA_GSMOPEN("cannot translate in iso_8859_1 error: %s (errno: %d)\n", GSMOPEN_P_LOG, strerror(errno), errno);
return -1;
@@ -2597,11 +2595,7 @@ int iso_8859_1_to_utf8(private_t *tech_p
}
inbytesleft = strlen(iso_8859_1_in) * 2;
-#ifdef WIN32
- iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-#else // WIN32
- iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-#endif // WIN32
+ iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
if (iconv_res == (size_t) -1) {
DEBUGA_GSMOPEN("ciao in=%s, inleft=%d, out=%s, outleft=%d, utf8_out=%s\n",
GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_out);
@@ -2642,11 +2636,7 @@ int utf8_to_ucs2(private_t *tech_pvt, ch
DEBUGA_GSMOPEN("in=%s, inleft=%d, out=%s, outleft=%d, utf8_in=%s, converted=%s\n",
GSMOPEN_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf8_in, converted);
-#ifdef WIN32
- iconv_res = iconv(iconv_format, (const char **) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-#else // WIN32
- iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
-#endif // WIN32
+ iconv_res = iconv(iconv_format, (ICONV_INBUF_TYPE)&inbuf, &inbytesleft, &outbuf, &outbytesleft);
if (iconv_res == (size_t) -1) {
ERRORA("error: %s %d\n", GSMOPEN_P_LOG, strerror(errno), errno);
return -1;