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.)
Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue
---
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
diff --git a/compat-include/sys/socket.h b/compat-include/sys/socket.h new file mode 100644 index 0000000..8722e57 --- /dev/null +++ b/compat-include/sys/socket.h @@ -0,0 +1,3 @@ +/* + * Workaround for Debian's kernel-package + */