As a workaround for now, you can remove all dodgy headers in the include/linux directory, then re-copy from the kernel.org source:
sudo rm -r /usr/src/rbp2-headers-4.14.78-4-osmc/include/linux/*
sudo cp -ar ./linux-4.14.78/include/linux/* /usr/src/rbp2-headers-4.14.78-4-osmc/include/linux/
The WireGuard make sails through – though, in my case, I needed to add the package libmnl-dev
.
osmc@osmc:~$ modinfo wireguard
filename: /lib/modules/4.14.78-4-osmc/extra/wireguard.ko
alias: net-pf-16-proto-16-family-wireguard
alias: rtnl-link-wireguard
version: 0.0.20181218-13-g83a9318
author: Jason A. Donenfeld <Jason@zx2c4.com>
description: WireGuard secure network tunnel
license: GPL v2
srcversion: 2D91A3D8F670D97E4F9BE3C
depends: ipv6,udp_tunnel,ip6_udp_tunnel
name: wireguard
vermagic: 4.14.78-4-osmc SMP preempt mod_unload modversions ARMv7 p2v8
As for getting it to work, I’ll leave that to you!