making wireguard work on RHEL7/etc.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Apr 5 18:15:44 CEST 2018
On Thu 2018-04-05 11:08:20 -0400, Daniel Kahn Gillmor wrote:
> On Tue 2017-06-27 13:08:14 +0200, Jason A. Donenfeld wrote:
>> compat.h is a dumpster fire already. Tons of people use the RHEL kernel.
>> I think supporting it won't make an already gross cess pool any more
>> disgusting. It's a file of hacks; I might as well add another.
>> (I probably won't add hacks, though, for the heaps of random custom
>> Android vendor kernels.)
> sorry to dredge this thread back up from the archives...
> https://bugs.debian.org/894909 shows someone trying to build wireguard
> against the debian 8 ("jessie" aka "oldstable") 3.16 kernel saying that
> they needed a similar patch to make the kernel module build.
> I know that debian's kernel team does backport a lot of fixes to our
> supported older kernels, similar to older releases of RedHat.
> i'm asking over on #debian-kernel (on OFTC) to see whether there is some
> similar to RHEL_MAJOR or CONFIG_SUSE_KERNEL or UTS_UBUNTU_RELEASE_ABI
> that we can use for jessie.
Ben Hutchings of the debian kernel team followed up there suggesting
feature tests or autoconf-type checks:
11:02 < dkg> https://bugs.debian.org/894909 suggests that some of the
backported fixes to 3.16 in jessie are getting in the way
of compiling wireguard. the referenced upstream thread
shows that they worked around the problem for RHEL7 using
some redhat-specific #defines
11:02 -zwiebelbot:#debian-kernel- Debian#894909: wireguard-dkms:
dev_recursion_level definition problem
11:02 < dkg> is there a comparable fix for older debian kernels?
11:04 < dkg> they have tests for #if RHEL_MAJOR == 7
11:04 < dkg> and #ifdef UTS_UBUNTU_RELEASE_ABI
11:52 < bwh> dkg: I've been there, and the way to deal with this is autoconf-type checks
11:55 < bwh> Well, either '#ifdef feature' or an autoconf-type check
So i don't think there's a comparable #define we can use for the
maintained debian kernels :/
i don't know how dev_recursion_level works. can we wrap the #define
dev_recursion_level() 0 inside an #ifndef dev_recursion_level safely?
More information about the WireGuard