Skip to content

Commit

Permalink
MT#55283 fix compilation for older kernels
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rfuchs committed Aug 18, 2023
1 parent 8893281 commit c83a0e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel-module/xt_RTPENGINE.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c83a0e8

Please sign in to comment.