Skip to contentSkip to conversation

lib: bridge: avoid redefinition of in6_addr

PATCH Applied Yureka 2 participants 2 messages Oct 12, 2025 – Oct 15, 2025

Subsystems (3)
lore
Share & tools
lore

Yureka

author
#0 lore raw

PATCH 1/1 lib: bridge: avoid redefinition of in6_addr

On musl libc, which does not use the kernel definitions of in6_addr, including the libc headers after the kernel (UAPI) headers would cause a redefinition error. The opposite order avoids the redefinition.

Fixes 9e89d5b94d749f37525cd8778311e1c9f28f172a

---

I'm not one-hundred-percent sure how the opposite order avoids the redefinition, but it fixes my build against musl libc headers.

 lib/bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bridge.c +1 -1
index 5386aa01..104f5858 100644
@@ -2,8 +2,8 @@
 
 #include <net/if.h>
 
-#include "bridge.h"
 #include "utils.h"
+#include "bridge.h"
 
 void bridge_print_vlan_flags(__u16 flags)
 {
Signature · 1 line
2.51.0
#1 lore raw
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 8 lines · On Sun, 12 Oct 2025 14:39:47 +0200 you wrote:

On musl libc, which does not use the kernel definitions of in6_addr, including the libc headers after the kernel (UAPI) headers would cause a redefinition error. The opposite order avoids the redefinition.

Fixes 9e89d5b94d749f37525cd8778311e1c9f28f172a

[...]

Here is the summary with links:
- [iproute2-next] lib: bridge: avoid redefinition of in6_addr

    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=7119f3736f68

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html