diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-01-03 23:14:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-04 14:30:52 -0500 |
commit | 6926e041a8920c8ec27e4e155efa760aa01551fd (patch) | |
tree | 84c94bc8ffb7e5738793ea78fd996a5294da94bf /include/uapi/linux/libc-compat.h | |
parent | 7bbfe00e025240505db3e04c3b296d7c023b2a26 (diff) | |
download | linux-6926e041a8920c8ec27e4e155efa760aa01551fd.tar.gz linux-6926e041a8920c8ec27e4e155efa760aa01551fd.tar.bz2 linux-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 'include/uapi/linux/libc-compat.h')
-rw-r--r-- | include/uapi/linux/libc-compat.h | 6 |
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 */ |