272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch 928 B

123456789101112131415161718192021222324252627282930313233
  1. --- a/include/uapi/linux/if_ether.h
  2. +++ b/include/uapi/linux/if_ether.h
  3. @@ -22,6 +22,7 @@
  4. #define _UAPI_LINUX_IF_ETHER_H
  5. #include <linux/types.h>
  6. +#include <linux/libc-compat.h>
  7. /*
  8. * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
  9. @@ -137,7 +138,10 @@
  10. */
  11. /* allow libcs like musl to deactivate this, glibc does not implement this. */
  12. -#ifndef __UAPI_DEF_ETHHDR
  13. +
  14. +#if defined(_NETINET_IF_ETHER_H)
  15. +#define __UAPI_DEF_ETHHDR 0
  16. +#else
  17. #define __UAPI_DEF_ETHHDR 1
  18. #endif
  19. --- a/include/uapi/linux/libc-compat.h
  20. +++ b/include/uapi/linux/libc-compat.h
  21. @@ -160,6 +160,8 @@
  22. #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
  23. /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
  24. #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
  25. +/* Definitions for if_ether.h */
  26. +#define __UAPI_DEF_ETHHDR 1
  27. /* Definitions for in.h */
  28. #define __UAPI_DEF_IN_ADDR 1