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
5/* bridge-specific defines for netfilter. 5/* bridge-specific defines for netfilter.
6 */6 */
7 7
8#ifndef __KERNEL__
9#include <netinet/if_ether.h> /* for __UAPI_DEF_ETHHDR if defined */
10#endif
11
8#include <linux/in.h>12#include <linux/in.h>
9#include <linux/netfilter.h>13#include <linux/netfilter.h>
10#include <linux/if_ether.h>14#include <linux/if_ether.h>