rtpproxy: bump to version 2025-11-04

Bump rtpproxy to version 2025-11-04. Each downstream patch got merged
and this fix the current compilation error with recvfromto.

rtpp_socket.c: In function 'rtpp_socket_rtp_recv':
rtpp_socket.c:262:31: error: passing argument 5 of 'recvfromto' from incompatible pointer type [-Wincompatible-pointer-types]
  262 |       sstosa(&packet->raddr), &packet->rlen, sstosa(&packet->_laddr), &llen,
      |                               ^~~~~~~~~~~~~
      |                               |
      |                               socklen_t * {aka unsigned int *}
In file included from rtpp_socket.c:45:
rtpp_network.h:56:3: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'socklen_t *' {aka 'unsigned int *'}
   56 |   size_t *, struct sockaddr *, size_t *, struct timeval *);
      |   ^~~~~~~~

2 new trivial pending patch (proposed upstream) are now required to
permit correct compilation.

This bump from 2.x to 3.x but checking the changlog no breaking change
should be triggered by this version jump.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi
2025-11-20 12:59:39 +01:00
parent a5c29c23f0
commit fcff90abe1
6 changed files with 86 additions and 136 deletions

View File

@@ -12,10 +12,10 @@ PKG_NAME:=rtpproxy
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/sippy/rtpproxy.git PKG_SOURCE_URL:=https://github.com/sippy/rtpproxy.git
PKG_SOURCE_DATE=2019-10-02 PKG_SOURCE_DATE=2025-11-04
PKG_SOURCE_VERSION:=aa1f179e09097f467bc4726e3300014c1e35246f PKG_SOURCE_VERSION:=4909e7b75a9c33265cecd39d082240b26a43f075
PKG_RELEASE:=4 PKG_RELEASE:=1
PKG_MIRROR_HASH:=36ecff6b69b580db5fe7e34e1d6764f111aa26ce81999743cea1f3c80ffa545c PKG_MIRROR_HASH:=cd7f184e485ea9ca1ad6dc0b3f2ebd8562cb6276fdc099caeb473d9f73910669
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1 PKG_INSTALL:=1
@@ -60,7 +60,8 @@ $(call Package/rtpproxy/Default)
endef endef
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--without-xsltproc --without-xsltproc \
--disable-debug
# Otherwise OpenWrt's CPPFLAGS are ignored # Otherwise OpenWrt's CPPFLAGS are ignored
TARGET_CFLAGS+=$(TARGET_CPPFLAGS) TARGET_CFLAGS+=$(TARGET_CPPFLAGS)

View File

@@ -0,0 +1,27 @@
From c4271a63d77185b0df4e1305573e28e4f94b6572 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Thu, 20 Nov 2025 12:54:15 +0100
Subject: [PATCH] Add missing pthread.h in rtpp_proc_async
Fix compilation error for missing pthread_t type name.
rtpp_proc_async.h:44:34: error: unknown type name 'pthread_t'
44 | void rtpp_proc_async_setprocname(pthread_t thread_id, const char *pname);
| ^~~~~~~~~
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
src/rtpp_proc_async.h | 2 ++
1 file changed, 2 insertions(+)
--- a/src/rtpp_proc_async.h
+++ b/src/rtpp_proc_async.h
@@ -28,6 +28,8 @@
#ifndef _RTPP_PROC_ASYNC_H_
#define _RTPP_PROC_ASYNC_H_
+#include <pthread.h>
+
struct rtpp_proc_async;
struct rtpp_anetio_cf;
struct rtpp_cfg;

View File

@@ -0,0 +1,53 @@
From 8e0799fbf503dc20e51ffb16d8b9867977753035 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Thu, 20 Nov 2025 12:50:55 +0100
Subject: [PATCH] Add check for declared optreset
MUSL actually declare optreset and this cause compilation error:
librtpp_main.c:44:12: error: static declaration of 'optreset' follows non-static declaration
44 | static int optreset; /* Not present in linux */
| ^~~~~~~~
Better handle this by scanning a declared optreset in configure.ac and
depend on the HAVE_DECL_OPTRESET macro to statically declare it instead
of extern reference it.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
configure.ac | 2 ++
src/librtpp_main.c | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/configure.ac
+++ b/configure.ac
@@ -449,6 +449,8 @@ AC_LINK_IFELSE(
)
AC_CHECK_FUNCS([pthread_yield pthread_setname_np])
+AC_CHECK_DECLS([optreset], [], [], [[#include <unistd.h>]])
+
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],[enable generation of documentation]),
[ENABLE_DOCS=${enableval}], [ENABLE_DOCS=no])
--- a/src/librtpp_main.c
+++ b/src/librtpp_main.c
@@ -27,6 +27,8 @@
#include <unistd.h>
+#include "config.h"
+
#include "librtpproxy.h"
#include "librtpp_main.h"
@@ -38,8 +40,8 @@ struct opt_save {
int optreset;
};
-#if defined(__linux__)
-static int optreset; /* Not present in linux */
+#if !HAVE_DECL_OPTRESET
+static int optreset; /* Not present in glibc */
#endif
#define OPT_SAVE(sp) (*(sp) = (struct opt_save){optarg, optind, optopt, opterr, optreset})

View File

@@ -1,32 +0,0 @@
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,7 @@ include $(top_srcdir)/autosrc/Makefile.a
UCL_DIR=$(top_srcdir)/external/libucl
-bin_PROGRAMS=rtpproxy rtpproxy_debug
+bin_PROGRAMS=rtpproxy
noinst_PROGRAMS = rtpp_rzmalloc_perf rtpp_fintest
if BUILD_OBJCK
--- a/modules/acct_csv/Makefile.am
+++ b/modules/acct_csv/Makefile.am
@@ -1,6 +1,6 @@
include $(top_srcdir)/m4/memdeb.ami
-pkglib_LTLIBRARIES = rtpp_acct_csv.la rtpp_acct_csv_debug.la
+pkglib_LTLIBRARIES = rtpp_acct_csv.la
rtpp_acct_csv_la_SOURCES = rtpp_acct_csv.c
rtpp_acct_csv_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
--- a/modules/acct_rtcp_hep/Makefile.am
+++ b/modules/acct_rtcp_hep/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/m4/memdeb.ami
HEPSRCDIR=$(top_srcdir)/hepconnector
UCLSRCDIR=$(top_srcdir)/external/libucl
-pkglib_LTLIBRARIES = rtpp_acct_rtcp_hep.la rtpp_acct_rtcp_hep_debug.la
+pkglib_LTLIBRARIES = rtpp_acct_rtcp_hep.la
noinst_PROGRAMS = rtcp2json_test
rtcp2json_test_SOURCES = rtcp2json_test.c rtpp_sbuf.c rtcp2json.c

View File

@@ -1,76 +0,0 @@
commit aa43d358634ab9bf66250babab743a846e2bd689
Author: Sebastian Kemper <sebastian_ml@gmx.net>
Date: Thu Oct 3 19:58:08 2019 +0200
Fix RTP crypto setup
RTPProxy's configure script checks for both libsrtp and libsrtp2. When
both are available the configure script ends up setting
LIBS_SRTP="-lsrtp2"
and defining both ENABLE_SRTP and ENABLE_SRTP2. But the below
preprocessor macro in extractaudio/eaud_crypto.c can only deal with one
or the other, not both:
#if ENABLE_SRTP
# include <srtp/srtp.h>
# define srtp_crypto_policy_set_rtp_default crypto_policy_set_rtp_default
# define srtp_crypto_policy_set_rtcp_default crypto_policy_set_rtcp_default
# define srtp_sec_serv_t sec_serv_t
# define srtp_err_status_ok err_status_ok
#elif ENABLE_SRTP2
# include <srtp2/srtp.h>
#else
# error "One of srtp or srtp2 must be configured."
#endif
So it chooses a setup which would be valid for libsrtp and not libsrtp2.
But afterward the build system tries to link against libsrtp2 (because
of LIBS_SRTP="-lsrtp2") and the compile fails:
/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/lib/gcc/mips-openwrt-linux-musl/7.4.0/../../../../mips-openwrt-linux-musl/bin/ld: extractaudio-eaud_crypto.o: in function `eaud_crypto_getopt_parse':
eaud_crypto.c:(.text+0xc8): undefined reference to `crypto_policy_set_rtp_default'
/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/lib/gcc/mips-openwrt-linux-musl/7.4.0/../../../../mips-openwrt-linux-musl/bin/ld: eaud_crypto.c:(.text+0xd0): undefined reference to `crypto_policy_set_rtcp_default'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:567: extractaudio] Error 1
Fix this by checking for libsrtp only if libsrtp2 is not found.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
--- a/configure.ac
+++ b/configure.ac
@@ -140,22 +140,22 @@ then
AC_DEFINE([ENABLE_SNDFILE], 1, [Define if you have libsndfile library installed]))
fi
-# libsrtp
-AC_CHECK_HEADER(srtp/srtp.h, found_libsrtp=yes)
-if test "$found_libsrtp" = yes
-then
- AC_CHECK_LIB(srtp, srtp_init,
- LIBS_SRTP="-lsrtp"
- AC_DEFINE([ENABLE_SRTP], 1, [Define if you have libsrtp library installed]))
-fi
-
-# libsrtp2
+# libsrtp2 (preferred)
AC_CHECK_HEADER(srtp2/srtp.h, found_libsrtp2=yes)
if test "$found_libsrtp2" = yes
then
AC_CHECK_LIB(srtp2, srtp_init,
LIBS_SRTP="-lsrtp2"
AC_DEFINE([ENABLE_SRTP2], 1, [Define if you have libsrtp2 library installed]))
+else
+ # libsrtp
+ AC_CHECK_HEADER(srtp/srtp.h, found_libsrtp=yes)
+ if test "$found_libsrtp" = yes
+ then
+ AC_CHECK_LIB(srtp, srtp_init,
+ LIBS_SRTP="-lsrtp"
+ AC_DEFINE([ENABLE_SRTP], 1, [Define if you have libsrtp library installed]))
+ fi
fi
# libelperiodic

View File

@@ -1,23 +0,0 @@
From f6c1f9e5924246216a05c295f450989ad9c80104 Mon Sep 17 00:00:00 2001
From: Maksym Sobolyev <sobomax@sippysoft.com>
Date: Thu, 13 May 2021 11:42:29 -0700
Subject: [PATCH] Resolve build breakage after ekt member of the policy struct
has been deprecated by the libsrtp. We have not been using that member to do
anything meaningful anyhow and the struct is inied to \0, so it should have
no adverse effect.
---
extractaudio/eaud_crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/extractaudio/eaud_crypto.c
+++ b/extractaudio/eaud_crypto.c
@@ -153,7 +153,7 @@ eaud_crypto_getopt_parse(char *optarg)
srtp_crypto_policy_set_rtp_default(&rval->policy.rtp);
srtp_crypto_policy_set_rtcp_default(&rval->policy.rtcp);
rval->policy.key = (uint8_t *)rval->key;
- rval->policy.ekt = NULL; rval->policy.next = NULL;
+ rval->policy.next = NULL;
rval->policy.window_size = 128;
rval->policy.allow_repeat_tx = 0;
rval->policy.rtp.auth_tag_len = suite->tag_size;