batman-adv: compat: fix compilation for kernels >= 4.11 on Debian
PATCH 1/1 batman-adv: compat: fix compilation for kernels >= 4.11 on Debian
This patch is a workaround for the following issue:
[...]/batman-adv/build/net/batman-adv/../../../compat-sources/net/core/skbuff.o ./include/linux/if.h:27:11: error: unable to open 'sys/socket.h' In file included from ./include/linux/compat.h:16:0,
from ./include/linux/ethtool.h:16,
from [...]/batman-adv/build/../compat-include/linux/ethtool.h:25,
from ./include/linux/netdevice.h:42,
from [...]/batman-adv/build/../compat-include/linux/netdevice.h:25,
from ./include/linux/icmpv6.h:12,
from ./include/linux/ipv6.h:82,
from [...]/batman-adv/build/net/batman-adv/../../../compat-sources/net/core/skbuff.c:36:./include/linux/if.h:27:54: fatal error: sys/socket.h: No such file or directory
#include <sys/socket.h> /* for struct sockaddr. */
It seems to occur since:
"uapi: fix linux/if.h userspace compilation errors" (2618be7dcc, Linux 4.11-rc1)
Simply including an empty sys/socket.h makes the kernel module compile again. (The #ifndef __KERNEL__, which kernel-package / make-kpkg stripped, should have removed this include for kernel modules anyway.)
---
Fixes:
- https://www.open-mesh.org/issues/333
--- compat-include/sys/socket.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 compat-include/sys/socket.h
compat-include/sys/socket.h new file +3 -0
@@ -0,0 +1,3 @@ +/* +* Workaround for Debian's kernel-package +*/
Signature · 1 line
2.1.4
On Montag, 24. April 2017 22:03:31 CEST Linus Lüssing wrote:
[...]
Quoted 8 lines
It seems to occur since:
"uapi: fix
linux/if.huserspace compilation errors" (2618be7dcc, Linux 4.11-rc1)Simply including an empty
sys/socket.hmakes the kernel module compile again. (The #ifndef__KERNEL__, which kernel-package / make-kpkg stripped, should have removed this include for kernel modules anyway.)
Hm, sounds again like something which should be fixed somewhere else (not by batman-adv), right?
Kind regards,
Sven