aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/libc-compat.h
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-01-03 23:14:21 +0100
committerDavid S. Miller <davem@davemloft.net>2018-01-04 14:30:52 -0500
commit6926e041a8920c8ec27e4e155efa760aa01551fd (patch)
tree84c94bc8ffb7e5738793ea78fd996a5294da94bf /include/uapi/linux/libc-compat.h
parentipv6: fix general protection fault in fib6_add() (diff)
downloadlinux-dev-6926e041a8920c8ec27e4e155efa760aa01551fd.tar.xz
linux-dev-6926e041a8920c8ec27e4e155efa760aa01551fd.zip
uapi/if_ether.h: prevent redefinition of struct ethhdr
Musl provides its own ethhdr struct definition. Add a guard to prevent its definition of the appropriate musl header has already been included. glibc does not implement this header, but when glibc will implement this they can just define __UAPI_DEF_ETHHDR 0 to make it work with the kernel. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/uapi/linux/libc-compat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
index 8254c937c9f4..fc29efaa918c 100644
--- a/include/uapi/linux/libc-compat.h
+++ b/include/uapi/linux/libc-compat.h
@@ -264,4 +264,10 @@
#endif /* __GLIBC__ */
+/* Definitions for if_ether.h */
+/* allow libcs like musl to deactivate this, glibc does not implement this. */
+#ifndef __UAPI_DEF_ETHHDR
+#define __UAPI_DEF_ETHHDR 1
+#endif
+
#endif /* _UAPI_LIBC_COMPAT_H */