diff options
| author | Ming Liu <peter.x.liu@external.atlascopco.com> | 2016-09-27 08:44:48 +0200 | 
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-10-03 19:19:57 +0200 | 
| commit | aba02d72d6985a2921e55f67e4898353505afc7c (patch) | |
| tree | 8678118cf0a46662e6bd1f7a09b399c6ecb7cc5d | |
| parent | 08b315e1f564203666ecde95190f59547375b491 (diff) | |
| download | meta-openembedded-aba02d72d6985a2921e55f67e4898353505afc7c.tar.gz | |
libnet: fixes musl libc build
This patch is back ported from libnet upstream.
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch | 58 | ||||
| -rw-r--r-- | meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb | 4 | 
2 files changed, 61 insertions, 1 deletions
| diff --git a/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch b/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch new file mode 100644 index 0000000000..98008dba94 --- /dev/null +++ b/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch | |||
| @@ -0,0 +1,58 @@ | |||
| 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 | |||
| 6 | Upstream-Status: Backport | ||
| 7 | |||
| 8 | The workarounds for glibc < 2.1 (was released february 1999) break the | ||
| 9 | build with musl libc. | ||
| 10 | |||
| 11 | It is very unlikely that 2.0 or earlier is still in use, and if so, | ||
| 12 | 1) that's a big security hole | ||
| 13 | 2) code wouldnt compile anyway since noone tested build in the last decade | ||
| 14 | 3) 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 | |||
| 17 | Closes #52 | ||
| 18 | |||
| 19 | Signed-off-by: rofl0r <retnyg@gmx.net> | ||
| 20 | Signed-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 | |||
| 25 | diff --git a/src/libnet_link_linux.c b/src/libnet_link_linux.c | ||
| 26 | index 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 | -- | ||
| 57 | 1.9.1 | ||
| 58 | |||
| diff --git a/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb b/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb index a558e8096c..dfc2049604 100644 --- a/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb +++ b/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb | |||
| @@ -8,7 +8,9 @@ DEPENDS = "libpcap" | |||
| 8 | # There are major API changes beween libnet v1.0 and libnet v1.1 | 8 | # There are major API changes beween libnet v1.0 and libnet v1.1 | 
| 9 | PROVIDES = "libnet-1.2rc2" | 9 | PROVIDES = "libnet-1.2rc2" | 
| 10 | 10 | ||
| 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/libnet-dev/${BPN}-${PV}.tar.gz" | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/libnet-dev/${BPN}-${PV}.tar.gz \ | 
| 12 | file://0001-Support-musl-libc-remove-support-for-glibc-2.1.patch \ | ||
| 13 | " | ||
| 12 | 14 | ||
| 13 | SRC_URI[md5sum] = "f051e6e5bdecddb90f77c701c2ca1804" | 15 | SRC_URI[md5sum] = "f051e6e5bdecddb90f77c701c2ca1804" | 
| 14 | SRC_URI[sha256sum] = "72c380785ad44183005e654b47cc12485ee0228d7fa6b0a87109ff7614be4a63" | 16 | SRC_URI[sha256sum] = "72c380785ad44183005e654b47cc12485ee0228d7fa6b0a87109ff7614be4a63" | 
