wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* [wireguard-linux-compat] fallthrough macro breaks pre-5.4 kernel compatibility?
       [not found] <CAMTegSQZ=7GQMtbKpRu8Z-+igZVdKwQHb9HPyFt3ikYS2i5GsA@mail.gmail.com>
@ 2022-03-08  7:31 ` Dan George
  0 siblings, 0 replies; only message in thread
From: Dan George @ 2022-03-08  7:31 UTC (permalink / raw)
  To: WireGuard mailing list

Hi all,

I just tried compiling the latest wireguard-linux-compat kernel module
v1.0.20211208 for kernel 4.4 [1] and encountered the following error:
"net/wireguard/compat/siphash/siphash.c:112:36: error: ‘fallthrough’
undeclared (first use in this function)"
The previous version v1.0.20210606 compiles and runs fine.

Some (inexpert) digging suggests that this is because a recent patch
[2] modified siphash.c to use 'fallthrough', which is a Linux kernel
compiler macro that was only added in kernel 5.4 [3].

In which case, presumably, either 'fallthrough' needs to be removed
again, or the macro added in wireguard-linux-compat somewhere. I'm
happy to submit a patch for either (although would appreciate some
guidance if the second option), or someone with more experience can.

In my immediate case, removing all instances of 'fallthrough' from
siphash.c has fixed compilation.

Thanks,
Dan.

[1] Specifically, in case this becomes relevant, cross-compiling for
the Synology RT2600AC router (armv7l, kernel 4.4.60) from Ubuntu
20.04.4 x64 using gcc 4.9.3 according to the steps at
https://gitlab.com/Kendek/syno-router-scripts/-/issues/3
[2] https://git.zx2c4.com/wireguard-linux-compat/commit/?id=ea6b8e7be5072553b37df4b0b8ee6e0a37134738
[3] https://github.com/torvalds/linux/commit/294f69e662d1570703e9b56e95be37a9fd3afba5

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-14 17:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAMTegSQZ=7GQMtbKpRu8Z-+igZVdKwQHb9HPyFt3ikYS2i5GsA@mail.gmail.com>
2022-03-08  7:31 ` [wireguard-linux-compat] fallthrough macro breaks pre-5.4 kernel compatibility? Dan George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).