• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/babeld/0001-kernel_netlink.c-don-t-include-linux-if_bridge.h.patch
Thomas PetazzoniThomas Petazzoni committed 254da76865420 Aug 2016
Raw file
Source viewDiff to previous
 
1
From 723bbfd8bdb76012a3da937c7499cf3c0b111dd5 Mon Sep 17 00:00:00 2001
2
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3
Date: Sat, 20 Aug 2016 11:13:56 +0200
4
Subject: [PATCH] kernel_netlink.c: don't include <linux/if_bridge.h>
5
MIME-Version: 1.0
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
8
​
9
Including <linux/if_bridge.h> causes the inclusion of <linux/in6.h>,
10
which defines 'struct in6_addr', also defined in <netinet/in.h>, causing
11
a build failure with the musl C library:
12
​
13
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_bridge.h:18:0,
14
                 from kernel_netlink.c:42,
15
                 from kernel.c:31:
16
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
17
 struct in6_addr {
18
        ^
19
In file included from kernel_netlink.c:33:0,
20
                 from kernel.c:31:
21
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: note: originally defined here
22
 struct in6_addr {
23
        ^
24
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_bridge.h:18:0,
25
                 from kernel_netlink.c:42,
26
                 from kernel.c:31:
27
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:49:8: error: redefinition of ‘struct sockaddr_in6’
28
 struct sockaddr_in6 {
29
        ^
30
In file included from kernel_netlink.c:33:0,
31
                 from kernel.c:31:
32
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: note: originally defined here
33
 struct sockaddr_in6 {
34
        ^
35
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_bridge.h:18:0,
36
                 from kernel_netlink.c:42,
37
                 from kernel.c:31:
38
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:59:8: error: redefinition of ‘struct ipv6_mreq’
39
 struct ipv6_mreq {
40
        ^
41
In file included from kernel_netlink.c:33:0,
42
                 from kernel.c:31:
43
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: note: originally defined here
44
 struct ipv6_mreq {
45
        ^
46
​
47
In order to address this, this patch removes the <linux/if_bridge.h>
48
inclusion, and instead defines BRCTL_GET_BRIDGES to the appropriate
49
value if it's not provided by the C library.
50
​
51
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
52
---
53
 kernel_netlink.c | 6 +++++-
54
 1 file changed, 5 insertions(+), 1 deletion(-)
55
​
56
diff --git a/kernel_netlink.c b/kernel_netlink.c
57
index 4eadc39..1a5b3dd 100644
58
--- a/kernel_netlink.c
59
+++ b/kernel_netlink.c
60
@@ -39,10 +39,14 @@ THE SOFTWARE.
61
 #include <sys/socket.h>
62
 #include <linux/netlink.h>
63
 #include <linux/rtnetlink.h>
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.