diff options
4 files changed, 50 insertions, 82 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 deleted file mode 100644 index 98008dba94..0000000000 --- a/meta-oe/recipes-connectivity/libnet/libnet/0001-Support-musl-libc-remove-support-for-glibc-2.1.patch +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 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/0001-Use-standard-int64_t-instead-of-__int64_t-for-mingw-.patch b/meta-oe/recipes-connectivity/libnet/libnet/0001-Use-standard-int64_t-instead-of-__int64_t-for-mingw-.patch new file mode 100644 index 0000000000..f1c607dd8a --- /dev/null +++ b/meta-oe/recipes-connectivity/libnet/libnet/0001-Use-standard-int64_t-instead-of-__int64_t-for-mingw-.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From a1659e261888bdbed51803132d52d9a6c6803c8a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Joachim Nilsson <troglobit@gmail.com> | ||
| 3 | Date: Sat, 19 Oct 2019 12:26:26 +0200 | ||
| 4 | Subject: [PATCH] Use standard int64_t instead of __int64_t for mingw cross | ||
| 5 | build | ||
| 6 | |||
| 7 | Signed-off-by: Joachim Nilsson <troglobit@gmail.com> | ||
| 8 | --- | ||
| 9 | include/libnet/libnet-structures.h | 6 +++--- | ||
| 10 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/include/libnet/libnet-structures.h b/include/libnet/libnet-structures.h | ||
| 13 | index 6084caa..34fffc6 100644 | ||
| 14 | --- a/include/libnet/libnet-structures.h | ||
| 15 | +++ b/include/libnet/libnet-structures.h | ||
| 16 | @@ -49,9 +49,9 @@ struct libnet_port_list_chain | ||
| 17 | /* libnet statistics structure */ | ||
| 18 | struct libnet_stats | ||
| 19 | { | ||
| 20 | - __int64_t packets_sent; /* packets sent */ | ||
| 21 | - __int64_t packet_errors; /* packets errors */ | ||
| 22 | - __int64_t bytes_written; /* bytes written */ | ||
| 23 | + int64_t packets_sent; /* packets sent */ | ||
| 24 | + int64_t packet_errors; /* packets errors */ | ||
| 25 | + int64_t bytes_written; /* bytes written */ | ||
| 26 | }; | ||
| 27 | |||
| 28 | |||
| 29 | -- | ||
| 30 | 2.25.1 | ||
| 31 | |||
diff --git a/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb b/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb deleted file mode 100644 index 785abf66d6..0000000000 --- a/meta-oe/recipes-connectivity/libnet/libnet_1.2-rc3.bb +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | SUMMARY = "A packet dissection and creation library" | ||
| 2 | # libnet at packetfactory.net is dead | ||
| 3 | HOMEPAGE = "https://github.com/sam-github/libnet" | ||
| 4 | SECTION = "libs" | ||
| 5 | LICENSE = "BSD-2-Clause" | ||
| 6 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=3ec839e00408b484d33b472a86b7c266" | ||
| 7 | DEPENDS = "libpcap" | ||
| 8 | # There are major API changes beween libnet v1.0 and libnet v1.1 | ||
| 9 | PROVIDES = "libnet-1.2rc2" | ||
| 10 | |||
| 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 | " | ||
| 14 | |||
| 15 | SRC_URI[md5sum] = "f051e6e5bdecddb90f77c701c2ca1804" | ||
| 16 | SRC_URI[sha256sum] = "72c380785ad44183005e654b47cc12485ee0228d7fa6b0a87109ff7614be4a63" | ||
| 17 | |||
| 18 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libnet-dev/files/" | ||
| 19 | UPSTREAM_CHECK_REGEX = "libnet-(?P<pver>\d+(\.\d+)+-*[a-z]*\d*)\.tar" | ||
| 20 | |||
| 21 | S = "${WORKDIR}/${BPN}-${PV}" | ||
| 22 | |||
| 23 | inherit autotools binconfig | ||
| 24 | |||
diff --git a/meta-oe/recipes-connectivity/libnet/libnet_1.2.bb b/meta-oe/recipes-connectivity/libnet/libnet_1.2.bb new file mode 100644 index 0000000000..a996f9404b --- /dev/null +++ b/meta-oe/recipes-connectivity/libnet/libnet_1.2.bb | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | SUMMARY = "A packet dissection and creation library" | ||
| 2 | HOMEPAGE = "https://github.com/libnet/libnet" | ||
| 3 | |||
| 4 | SECTION = "libs" | ||
| 5 | |||
| 6 | LICENSE = "BSD-2-Clause" | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=07f291bf6e78efa05cec668cf6a09acc" | ||
| 8 | |||
| 9 | DEPENDS = "libpcap" | ||
| 10 | |||
| 11 | SRC_URI = "git://github.com/libnet/libnet.git;protocol=https;branch=master \ | ||
| 12 | file://0001-Use-standard-int64_t-instead-of-__int64_t-for-mingw-.patch" | ||
| 13 | |||
| 14 | SRC_URI[sha256sum] = "1e9e9054d688b059bcbaf878d8c4fbf69bfc0c9386cd4e7779fbb53339050d2e" | ||
| 15 | SRCREV = "deeeeaeb84f8bc5d2299913d4ccf53d0d4c26966" | ||
| 16 | |||
| 17 | S = "${WORKDIR}/git" | ||
| 18 | |||
| 19 | inherit autotools binconfig | ||
