From 9d590cc73a05511d8465e36459bc0f17935118d8 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Tue, 29 Apr 2014 10:02:05 +0200 Subject: [PATCH] musl/linux-header: use libc-compat.h to avoid redefinition errors for 'struct ethhdr' --- .../linux-header/libc-compat-if_ether.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 base/musl/pkg/linux-header/libc-compat-if_ether.patch diff --git a/base/musl/pkg/linux-header/libc-compat-if_ether.patch b/base/musl/pkg/linux-header/libc-compat-if_ether.patch new file mode 100644 index 000000000..fac79ea0b --- /dev/null +++ b/base/musl/pkg/linux-header/libc-compat-if_ether.patch @@ -0,0 +1,42 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../musl/pkg/linux-header/libc-compat-if_ether.patch +# Copyright (C) 2014 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Avoid redefinition errors for 'struct ethhdr' + +--- a/include/uapi/linux/if_ether.h ++++ b/include/uapi/linux/if_ether.h +@@ -22,6 +22,7 @@ + #define _UAPI_LINUX_IF_ETHER_H + + #include ++#include + + /* + * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble +@@ -130,11 +131,13 @@ + * This is an Ethernet frame header. + */ + ++#if __UAPI_DEF_ETHHDR + struct ethhdr { + unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ + unsigned char h_source[ETH_ALEN]; /* source ether addr */ + __be16 h_proto; /* packet type ID field */ + } __attribute__((packed)); ++#endif + + + #endif /* _UAPI_LINUX_IF_ETHER_H */