From c83a0e89991cc4216336928408a39e0de52a51ae Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 14 Aug 2023 12:15:59 -0400 Subject: [PATCH] MT#55283 fix compilation for older kernels Older kernels (3.x) have ktime_t defined as a union, which means we can't just treat it as a number and must wrap it inside {}. This still also works for later kernels which have it typedef'd as an int. closes #1708 Change-Id: I6195e45eb80f6e430e97247f62cd5f6696450b09 --- kernel-module/xt_RTPENGINE.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 1b8f092c3d..1c57c41b9a 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -5450,7 +5450,7 @@ static unsigned int rtpengine46(struct sk_buff *skb, struct sk_buff *oskb, skb_trim(skb, rtp.header_len + rtp.payload_len); if (is_rtcp == RTCP_FORWARD) { // mark packet as "handled" with negative timestamp - oskb->tstamp = -oskb->tstamp; + oskb->tstamp = (ktime_t) {-ktime_to_ns(oskb->tstamp)}; nf_action = XT_CONTINUE; } }