History

include: uapi: netfilter_bridge.h: Cover for musl libc

Musl defines its own struct ethhdr and thus defines __UAPI_DEF_ETHHDR to zero. To avoid struct redefinition errors, user space is therefore supposed to include netinet/if_ether.h before (or instead of) linux/if_ether.h. To relieve them from this burden, include the libc header here if not building for kernel space.

Phil Sutter committed 9 months ago

Commit 4edd4ba1 parent a6d28eb1 file · +4 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/netfilter_bridge.h+4−0
@@ -5,6 +5,10 @@ · 4 unmodified lines
55 /* bridge-specific defines for netfilter.
66 */
77
8+#ifndef __KERNEL__
9+#include <netinet/if_ether.h> /* for __UAPI_DEF_ETHHDR if defined */
10+#endif
11+
812 #include <linux/in.h>
913 #include <linux/netfilter.h>
1014 #include <linux/if_ether.h>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t