summaryrefslogtreecommitdiff
path: root/include/uapi/linux/libc-compat.h
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-01-04 01:14:21 +0300
committerDavid S. Miller <davem@davemloft.net>2018-01-04 22:30:52 +0300
commit6926e041a8920c8ec27e4e155efa760aa01551fd (patch)
tree84c94bc8ffb7e5738793ea78fd996a5294da94bf /include/uapi/linux/libc-compat.h
parent7bbfe00e025240505db3e04c3b296d7c023b2a26 (diff)
downloadlinux-6926e041a8920c8ec27e4e155efa760aa01551fd.tar.xz
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 'include/uapi/linux/libc-compat.h')
-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 */