diff --git a/meta-oe/recipes-security/nmap/files/0002-Fix-building-with-libc.patch b/meta-oe/recipes-security/nmap/files/0002-Fix-building-with-libc.patch index 064be8ff85..6c2fdc6458 100644 --- a/meta-oe/recipes-security/nmap/files/0002-Fix-building-with-libc.patch +++ b/meta-oe/recipes-security/nmap/files/0002-Fix-building-with-libc.patch @@ -1,4 +1,4 @@ -From 2a361989b5f84ec23ba7ccb6e527a5590ff55deb Mon Sep 17 00:00:00 2001 +From c634826b85bc4b67890a18379025d1bdd530efa0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 20 Jan 2019 23:11:56 -0800 Subject: [PATCH] Fix building with libc++ @@ -6,15 +6,16 @@ Subject: [PATCH] Fix building with libc++ Upstream-Status: Pending Signed-off-by: Khem Raj +Signed-off-by: Leon Anavi --- - nping/EchoServer.cc | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) + nping/EchoServer.cc | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nping/EchoServer.cc b/nping/EchoServer.cc -index 40cd4d6..04433e1 100644 +index 41108fc67..d392039a6 100644 --- a/nping/EchoServer.cc +++ b/nping/EchoServer.cc -@@ -282,14 +282,14 @@ int EchoServer::nep_listen_socket(){ +@@ -212,14 +212,14 @@ int EchoServer::nep_listen_socket(){ server_addr6.sin6_len = sizeof(struct sockaddr_in6); #endif /* Bind to local address and the specified port */ @@ -32,7 +33,7 @@ index 40cd4d6..04433e1 100644 nping_print(VB_1, "Server bound to port %d", port); } } -@@ -320,12 +320,12 @@ int EchoServer::nep_listen_socket(){ +@@ -250,12 +250,12 @@ int EchoServer::nep_listen_socket(){ #endif /* Bind to local address and the specified port */ @@ -47,7 +48,7 @@ index 40cd4d6..04433e1 100644 nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno)); }else{ nping_print(VB_1, "Server bound to port %d", port); -@@ -561,7 +561,7 @@ clientid_t EchoServer::nep_match_headers(IPv4Header *ip4, IPv6Header *ip6, TCPHe +@@ -491,7 +491,7 @@ clientid_t EchoServer::nep_match_headers(IPv4Header *ip4, IPv6Header *ip6, TCPHe nping_print(DBG_3, ";"); /* The payload magic may affect the score only between * zero and 4 bytes. This is done to prevent long @@ -56,16 +57,7 @@ index 40cd4d6..04433e1 100644 * increasing the score a lot and cause problems for * the matching logic. */ current_score+= MIN(4, fspec->len)*FACTOR_PAYLOAD_MAGIC; -@@ -571,7 +571,7 @@ clientid_t EchoServer::nep_match_headers(IPv4Header *ip4, IPv6Header *ip6, TCPHe - default: - nping_warning(QT_2, "Bogus field specifier found in client #%d context. Please report a bug", ctx->getIdentifier()); - break; -- } -+ } - } /* End of field specifiers loop */ - - nping_print(DBG_3, "%s() current_score=%.02f candidate_score=%.02f", __func__, current_score, candidate_score); -@@ -650,7 +650,7 @@ clientid_t EchoServer::nep_match_packet(const u8 *pkt, size_t pktlen){ +@@ -581,7 +581,7 @@ clientid_t EchoServer::nep_match_packet(const u8 *pkt, size_t pktlen){ }else{ if( (tcplen=tcp.validate())==OP_FAILURE){ return CLIENT_NOT_FOUND; @@ -74,3 +66,6 @@ index 40cd4d6..04433e1 100644 if( (int)pktlen > (iplen+tcplen) ){ if( payload.storeRecvData(pkt+iplen+tcplen, pktlen-iplen-tcplen)!=OP_FAILURE) payload_included=true; +-- +2.43.0 + diff --git a/meta-oe/recipes-security/nmap/files/0004-libdnet-fix-PF_PACKET-conftest-nested-function.patch b/meta-oe/recipes-security/nmap/files/0004-libdnet-fix-PF_PACKET-conftest-nested-function.patch deleted file mode 100644 index 89571978ea..0000000000 --- a/meta-oe/recipes-security/nmap/files/0004-libdnet-fix-PF_PACKET-conftest-nested-function.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Khem Raj -Date: Tue, 24 Jun 2026 00:00:00 +0000 -Subject: [PATCH] libdnet: fix PF_PACKET conftest nested function - -The bundled libdnet-stripped AC_DNET_LINUX_PF_PACKET check used -"int foo() { return ETH_P_ALL; }" as the AC_TRY_COMPILE body, which the -generated configure places inside main(). clang rejects nested function -definitions ("function definition is not allowed here"), so the check -fails and configure aborts with "Ethernet support not found". Use a plain -expression statement that still references ETH_P_ALL. Patch both the macro -source and the shipped configure. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- ---- a/libdnet-stripped/m4/acinclude.m4 -+++ b/libdnet-stripped/m4/acinclude.m4 -@@ -149,7 +149,7 @@ - [AC_MSG_CHECKING(for Linux PF_PACKET sockets) - AC_TRY_COMPILE([#include - #include ], -- [int foo() { return ETH_P_ALL; }], -+ [(void) ETH_P_ALL;], - ac_cv_dnet_linux_pf_packet=yes, - ac_cv_dnet_linux_pf_packet=no) - AC_MSG_RESULT($ac_cv_dnet_linux_pf_packet) ---- a/libdnet-stripped/configure -+++ b/libdnet-stripped/configure -@@ -15219,7 +15219,7 @@ - int - main (void) - { --int foo() { return ETH_P_ALL; } -+(void) ETH_P_ALL; - ; - return 0; - } diff --git a/meta-oe/recipes-security/nmap/nmap_7.99.bb b/meta-oe/recipes-security/nmap/nmap_7.991.bb similarity index 94% rename from meta-oe/recipes-security/nmap/nmap_7.99.bb rename to meta-oe/recipes-security/nmap/nmap_7.991.bb index ea792d30f6..1553b36247 100644 --- a/meta-oe/recipes-security/nmap/nmap_7.99.bb +++ b/meta-oe/recipes-security/nmap/nmap_7.991.bb @@ -10,9 +10,8 @@ SRC_URI = "http://nmap.org/dist/${BP}.tar.bz2 \ file://0001-Include-time.h-header-to-pass-clang-compilation.patch \ file://0002-Fix-building-with-libc.patch \ file://0001-fix-racing-between-build-ncat-and-build-lua.patch \ - file://0004-libdnet-fix-PF_PACKET-conftest-nested-function.patch \ " -SRC_URI[sha256sum] = "df512492ffd108e53a27a06f26d8635bbe89e0e569455dc8ffef058c035d51b2" +SRC_URI[sha256sum] = "a5d507f29437bef3bedd4771ff9aaa8fc1c2a109ddba1f5b1cf12027456929be" UPSTREAM_CHECK_REGEX = "nmap-(?P\d+(\.\d+)+)\.tar" @@ -70,3 +69,5 @@ do_install:append() { FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${datadir}/ncat" RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'ndiff', 'python3-difflib python3-asyncio python3-xml', '', d)}" + +OEQA_BUILDPATHS_SKIP = "${HOME}"