0001-support-musl-libc.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From ffd7fab744a9ad2893169a8fb6244074604d5d0d Mon Sep 17 00:00:00 2001
  2. From: rofl0r <retnyg@gmx.net>
  3. Date: Tue, 12 Aug 2014 21:51:39 +0200
  4. Subject: [PATCH] Support musl libc, remove support for glibc < 2.1
  5. The workarounds for glibc < 2.1 (was released february 1999) break the
  6. build with musl libc.
  7. It is very unlikely that 2.0 or earlier is still in use, and if so,
  8. 1) that's a big security hole
  9. 2) code wouldnt compile anyway since noone tested build in the last decade
  10. 3) user of it wouldn't expect anyway to get bleeding edge sw built on it,
  11. so he would just use the latest version that works for him.
  12. Closes #52
  13. ---
  14. libnet/src/libnet_link_linux.c | 11 -----------
  15. 1 file changed, 11 deletions(-)
  16. diff --git a/libnet/src/libnet_link_linux.c b/libnet/src/libnet_link_linux.c
  17. index 054458d..3c6df3c 100644
  18. --- a/src/libnet_link_linux.c
  19. +++ b/src/libnet_link_linux.c
  20. @@ -30,26 +30,15 @@
  21. #include <sys/time.h>
  22. #include <net/if.h>
  23. -#if (__GLIBC__)
  24. #include <netinet/if_ether.h>
  25. #include <net/if_arp.h>
  26. -#else
  27. -#include <linux/if_arp.h>
  28. -#include <linux/if_ether.h>
  29. -#endif
  30. #if (HAVE_PACKET_SOCKET)
  31. #ifndef SOL_PACKET
  32. #define SOL_PACKET 263
  33. #endif /* SOL_PACKET */
  34. -#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
  35. #include <netpacket/packet.h>
  36. #include <net/ethernet.h> /* the L2 protocols */
  37. -#else
  38. -#include <asm/types.h>
  39. -#include <linux/if_packet.h>
  40. -#include <linux/if_ether.h> /* The L2 protocols */
  41. -#endif
  42. #endif /* HAVE_PACKET_SOCKET */
  43. #include "../include/libnet.h"