mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix compilation of libre >= 2.9.0
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
parent
de013aca25
commit
6dbe34354b
3 changed files with 6 additions and 22 deletions
|
@ -123,7 +123,7 @@ pkg_check_modules(NANOMSG IMPORTED_TARGET nanomsg)
|
|||
if(NOT NANOMSG_FOUND)
|
||||
pkg_check_modules(NANOMSG IMPORTED_TARGET libnanomsg>=1.0.0)
|
||||
endif()
|
||||
pkg_check_modules(RE IMPORTED_TARGET re>=0.5.6)
|
||||
pkg_check_modules(RE IMPORTED_TARGET re>=2.9.0)
|
||||
if(NOT RE_FOUND)
|
||||
pkg_check_modules(RE IMPORTED_TARGET libre>=0.5.6)
|
||||
endif()
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <villas/nodes/rtp.hpp>
|
||||
|
||||
extern "C" {
|
||||
#include <re/re_net.h>
|
||||
#include <re/re_main.h>
|
||||
#include <re/re_types.h>
|
||||
#include <re/re_mbuf.h>
|
||||
|
@ -548,7 +549,7 @@ retry: mbuf_set_pos(r->send_mb, RTP_HEADER_SIZE);
|
|||
mbuf_set_pos(r->send_mb, RTP_HEADER_SIZE);
|
||||
|
||||
/* Send dataset */
|
||||
ret = rtp_send(r->rs, &r->out.saddr_rtp, false, false, RTP_PACKET_TYPE, ts, r->send_mb);
|
||||
ret = rtp_send(r->rs, &r->out.saddr_rtp, false, false, RTP_PACKET_TYPE, ts, 0, r->send_mb);
|
||||
if (ret)
|
||||
throw RuntimeError("Error from rtp_send, reason: {}", ret);
|
||||
|
||||
|
@ -564,22 +565,6 @@ int villas::node::rtp_poll_fds(NodeCompat *n, int fds[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
int villas::node::rtp_netem_fds(NodeCompat *n, int fds[])
|
||||
{
|
||||
auto *r = n->getData<struct rtp>();
|
||||
|
||||
int m = 0;
|
||||
struct udp_sock *rtp = (struct udp_sock *) rtp_sock(r->rs);
|
||||
struct udp_sock *rtcp = (struct udp_sock *) rtcp_sock(r->rs);
|
||||
|
||||
fds[m++] = udp_sock_fd(rtp, AF_INET);
|
||||
|
||||
if (r->rtcp.enabled)
|
||||
fds[m++] = udp_sock_fd(rtcp, AF_INET);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
__attribute__((constructor(110)))
|
||||
static void register_plugin() {
|
||||
p.name = "rtp";
|
||||
|
@ -602,5 +587,4 @@ static void register_plugin() {
|
|||
p.write = rtp_write;
|
||||
p.reverse = rtp_reverse;
|
||||
p.poll_fds = rtp_poll_fds;
|
||||
p.netem_fds = rtp_netem_fds;
|
||||
}
|
||||
|
|
|
@ -259,14 +259,14 @@ if ! pkg-config "comedilib >= 0.11.0" && \
|
|||
fi
|
||||
|
||||
# Build & Install libre
|
||||
if ! pkg-config "libre >= 0.5.6" && \
|
||||
if ! pkg-config "libre >= 2.9.0" && \
|
||||
[ -z "${SKIP_LIBRE}" ]; then
|
||||
git clone ${GIT_OPTS} --branch v0.6.1 https://github.com/creytiv/re.git
|
||||
git clone ${GIT_OPTS} --branch v2.9.0 https://github.com/baresip/re.git
|
||||
pushd re
|
||||
if [ -z "${PACKAGE}" ]; then
|
||||
make ${MAKE_OPTS} install
|
||||
else
|
||||
tar --transform 's|^\.|re-0.6.1|' -czvf ~/rpmbuild/SOURCES/re-0.6.1.tar.gz .
|
||||
tar --transform 's|^\.|re-0.6.1|' -czvf ~/rpmbuild/SOURCES/re-2.9.0.tar.gz .
|
||||
rpmbuild -ba rpm/re.spec
|
||||
fi
|
||||
popd
|
||||
|
|
Loading…
Add table
Reference in a new issue