510-remove-LINUX_NETDEVICE-hack.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. This fixes the following compile problem with kernel 4.20:
  2. In file included from arp.c:20:0:
  3. include/linux/if_arp.h:121:16: error: 'IFNAMSIZ' undeclared here (not in a function)
  4. char arp_dev[IFNAMSIZ];
  5. ^~~~~~~~
  6. make[7]: *** [Makefile:459: arp.o] Error 1
  7. This is caused by commit 6a12709da354 ("net: if_arp: use define instead
  8. of hard-coded value") in the upstream Linux kernel which is integrated
  9. in Linux 4.20.
  10. --- a/src/oamd/io.c
  11. +++ b/src/oamd/io.c
  12. @@ -20,7 +20,6 @@
  13. #include <net/if.h>
  14. #include <netinet/in.h>
  15. #include <atm.h>
  16. -#define _LINUX_NETDEVICE_H /* glibc2 */
  17. #include <linux/types.h>
  18. #include <linux/if_arp.h>
  19. --- a/src/arpd/itf.c
  20. +++ b/src/arpd/itf.c
  21. @@ -12,7 +12,6 @@
  22. #include <sys/types.h>
  23. #include <linux/atmclip.h>
  24. #include <sys/socket.h>
  25. -#define _LINUX_NETDEVICE_H /* glibc2 */
  26. #include <linux/types.h>
  27. #include <linux/if_arp.h>
  28. --- a/src/arpd/io.c
  29. +++ b/src/arpd/io.c
  30. @@ -21,7 +21,6 @@
  31. #include <atm.h>
  32. #include <linux/atmclip.h> /* for CLIP_DEFAULT_IDLETIMER */
  33. #include <linux/atmarp.h>
  34. -#define _LINUX_NETDEVICE_H /* glibc2 */
  35. #include <linux/types.h>
  36. #include <linux/if_arp.h>
  37. --- a/src/arpd/arp.c
  38. +++ b/src/arpd/arp.c
  39. @@ -15,7 +15,6 @@
  40. #include <sys/types.h>
  41. #include <sys/socket.h> /* for linux/if_arp.h */
  42. #include <netinet/in.h> /* for ntohs, etc. */
  43. -#define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */
  44. #include <linux/types.h>
  45. #include <linux/if_arp.h>
  46. #include <linux/if_ether.h>