272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch 1.2 KB

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