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