b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: compat: fix compilation for kernels >= 4.11 on Debian
@ 2017-04-24 20:03 Linus Lüssing
  2017-04-25  6:28 ` Sven Eckelmann
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Lüssing @ 2017-04-24 20:03 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Manoj Srivastava, Dmitry V . Levin

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
+ */
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: compat: fix compilation for kernels >= 4.11 on Debian
  2017-04-24 20:03 [B.A.T.M.A.N.] [PATCH] batman-adv: compat: fix compilation for kernels >= 4.11 on Debian Linus Lüssing
@ 2017-04-25  6:28 ` Sven Eckelmann
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Eckelmann @ 2017-04-25  6:28 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Dmitry V . Levin, Manoj Srivastava

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

On Montag, 24. April 2017 22:03:31 CEST Linus Lüssing wrote:
[...]
> 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.)

Hm, sounds again like something which should be fixed somewhere else
(not by batman-adv), right?

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-25  6:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 20:03 [B.A.T.M.A.N.] [PATCH] batman-adv: compat: fix compilation for kernels >= 4.11 on Debian Linus Lüssing
2017-04-25  6:28 ` Sven Eckelmann

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).