[Buildroot] [PATCH 1/1] package/nmap: bump version to 7.991
Bernd Kuhls
bernd at kuhls.net
Sun Sep 6 10:34:55 UTC 2026
Added patch 0002 to fix build error introduced by upstream commit
https://github.com/nmap/nmap/commit/a24082eee41fcabf7fa180020e1771af3226b358
which was first added to this release.
Added patch 0003 to fix build error introduced by upstream commit
https://github.com/nmap/nmap/commit/8ef3ed1471eca613f1d43f602932d2c99d6e2e7c
which was first added to this release.
Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
---
Gitlab pipelines passed:
https://gitlab.com/bkuhls/buildroot/-/commits/4a177ea5a2f60477f7357e77ea0b8bb00b47a435
...if-compiling-without-Lua-support.-Cl.patch | 29 +++++++
.../0003-traceroute.cc-include-cstddef.patch | 82 +++++++++++++++++++
package/nmap/nmap.hash | 6 +-
package/nmap/nmap.mk | 2 +-
4 files changed, 115 insertions(+), 4 deletions(-)
create mode 100644 package/nmap/0002-Do-not-call-NSE-if-compiling-without-Lua-support.-Cl.patch
create mode 100644 package/nmap/0003-traceroute.cc-include-cstddef.patch
diff --git a/package/nmap/0002-Do-not-call-NSE-if-compiling-without-Lua-support.-Cl.patch b/package/nmap/0002-Do-not-call-NSE-if-compiling-without-Lua-support.-Cl.patch
new file mode 100644
index 0000000000..54cafdafbc
--- /dev/null
+++ b/package/nmap/0002-Do-not-call-NSE-if-compiling-without-Lua-support.-Cl.patch
@@ -0,0 +1,29 @@
+From 4c36cf12f246b52a8d510bdde8becd5c5b3bf8b5 Mon Sep 17 00:00:00 2001
+From: nnposter <nnposter at e0a8ed71-7df4-0310-8962-fdc924857419>
+Date: Wed, 12 Aug 2026 19:29:05 +0000
+Subject: [PATCH] Do not call NSE if compiling without Lua support. Close #3434
+
+Upstream: https://github.com/nmap/nmap/commit/4c36cf12f246b52a8d510bdde8becd5c5b3bf8b5
+
+Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
+---
+ nmap.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/nmap.cc b/nmap.cc
+index b94c71223..70206daed 100644
+--- a/nmap.cc
++++ b/nmap.cc
+@@ -1858,7 +1858,9 @@ void nmap_free_mem() {
+ AllProbes::service_scan_free();
+ traceroute_hop_cache_clear();
+ nsock_set_default_engine(NULL);
++#ifndef NOLUA
+ close_nse();
++#endif
+ }
+
+ int nmap_main(int argc, char *argv[]) {
+--
+2.47.3
+
diff --git a/package/nmap/0003-traceroute.cc-include-cstddef.patch b/package/nmap/0003-traceroute.cc-include-cstddef.patch
new file mode 100644
index 0000000000..8008b3fa76
--- /dev/null
+++ b/package/nmap/0003-traceroute.cc-include-cstddef.patch
@@ -0,0 +1,82 @@
+From 445573b27f3997b7eae456e849f003f18de5349e Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd at kuhls.net>
+Date: Sun, 6 Sep 2026 11:41:29 +0200
+Subject: [PATCH] traceroute.cc: include cstddef
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Adding this include fixes a build error seen with an old buildroot
+toolchain based on gcc-6.3.0/glibc-2.25:
+
+traceroute.cc: In function ‘bool parse_encapsulated_reply(const u8*, unsigned int, Reply*)’:
+traceroute.cc:1084:24: error: expected primary-expression before ‘struct’
+ if (len < offsetof(struct icmp, icmp_id) + 2)
+ ^~~~~~
+In file included from struct_ip.h:56:0,
+ from traceroute.cc:113:
+traceroute.cc:1084:37: error: ‘icmp_hun’ was not declared in this scope
+ if (len < offsetof(struct icmp, icmp_id) + 2)
+ ^
+traceroute.cc:1084:44: error: ‘offsetof’ was not declared in this scope
+ if (len < offsetof(struct icmp, icmp_id) + 2)
+ ^
+traceroute.cc:1091:52: error: expected primary-expression before ‘struct’
+ if (len < sizeof(struct icmpv6_hdr) + offsetof(struct icmpv6_msg_echo, icmpv6_seq) + 2)
+ ^~~~~~
+traceroute.cc:1091:76: error: ‘icmpv6_seq’ was not declared in this scope
+ if (len < sizeof(struct icmpv6_hdr) + offsetof(struct icmpv6_msg_echo, icmpv6_seq) + 2)
+ ^~~~~~~~~~
+traceroute.cc:1091:86: error: ‘offsetof’ was not declared in this scope
+ if (len < sizeof(struct icmpv6_hdr) + offsetof(struct icmpv6_msg_echo, icmpv6_seq) + 2)
+ ^
+traceroute.cc:1098:24: error: expected primary-expression before ‘struct’
+ if (len < offsetof(struct tcp_hdr, th_sport) + 2) return false;
+ ^~~~~~
+traceroute.cc:1098:40: error: ‘th_sport’ was not declared in this scope
+ if (len < offsetof(struct tcp_hdr, th_sport) + 2) return false;
+ ^~~~~~~~
+traceroute.cc:1098:48: error: ‘offsetof’ was not declared in this scope
+ if (len < offsetof(struct tcp_hdr, th_sport) + 2) return false;
+ ^
+traceroute.cc:1102:24: error: expected primary-expression before ‘struct’
+ if (len < offsetof(struct udp_hdr, uh_sport) + 2) return false;
+ ^~~~~~
+traceroute.cc:1102:40: error: ‘uh_sport’ was not declared in this scope
+ if (len < offsetof(struct udp_hdr, uh_sport) + 2) return false;
+ ^~~~~~~~
+traceroute.cc:1102:48: error: ‘offsetof’ was not declared in this scope
+ if (len < offsetof(struct udp_hdr, uh_sport) + 2) return false;
+ ^
+traceroute.cc:1106:24: error: expected primary-expression before ‘struct’
+ if (len < offsetof(struct sctp_hdr, sh_sport) + 2) return false;
+ ^~~~~~
+traceroute.cc:1106:41: error: ‘sh_sport’ was not declared in this scope
+ if (len < offsetof(struct sctp_hdr, sh_sport) + 2) return false;
+ ^~~~~~~~
+traceroute.cc:1106:49: error: ‘offsetof’ was not declared in this scope
+ if (len < offsetof(struct sctp_hdr, sh_sport) + 2) return false;
+ ^
+
+Upstream: https://github.com/nmap/nmap/pull/3473
+
+Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
+---
+ traceroute.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/traceroute.cc b/traceroute.cc
+index 231de10fc..5b040ce2d 100644
+--- a/traceroute.cc
++++ b/traceroute.cc
+@@ -122,6 +122,7 @@ individually.
+ #include <dnet.h>
+
+ #include <algorithm>
++#include <cstddef>
+ #include <list>
+ #include <map>
+ #include <set>
+--
+2.47.3
+
diff --git a/package/nmap/nmap.hash b/package/nmap/nmap.hash
index 17f9eb7f5e..bbdb81ec4f 100644
--- a/package/nmap/nmap.hash
+++ b/package/nmap/nmap.hash
@@ -1,6 +1,6 @@
-# From https://nmap.org/dist/sigs/nmap-7.99.tar.bz2.digest.txt (lowercase)
-sha256 df512492ffd108e53a27a06f26d8635bbe89e0e569455dc8ffef058c035d51b2 nmap-7.99.tar.bz2
-sha512 9ff69659b76573eb10b6e472a0217032fd5fed20f0ac971b3736a4222fb6251c5fbf381ebea7ede313b8ff2feac90a848f645000c61200772d01b843594f4ba4 nmap-7.99.tar.bz2
+# From https://nmap.org/dist/sigs/nmap-7.991.tar.bz2.digest.txt (lowercase)
+sha256 a5d507f29437bef3bedd4771ff9aaa8fc1c2a109ddba1f5b1cf12027456929be nmap-7.991.tar.bz2
+sha512 d87836eedd453f4f5e55075b50640a6ad61cb5dbc1f887dbaf725fa8c32b6a472d838d174c68a2efa749b3b028512d2f0467aea0ff0b5f5752df714db62f8320 nmap-7.991.tar.bz2
# Locally calculated
sha256 9d9a9a763c0e6145172cfe7d8483e23b38ce60b6c79a82e4894242917bdae6d3 LICENSE
diff --git a/package/nmap/nmap.mk b/package/nmap/nmap.mk
index b04d8b080d..0dd96d2b95 100644
--- a/package/nmap/nmap.mk
+++ b/package/nmap/nmap.mk
@@ -4,7 +4,7 @@
#
################################################################################
-NMAP_VERSION = 7.99
+NMAP_VERSION = 7.991
NMAP_SITE = https://nmap.org/dist
NMAP_SOURCE = nmap-$(NMAP_VERSION).tar.bz2
NMAP_DEPENDENCIES = liblinear libpcap
--
2.47.3
More information about the buildroot
mailing list