Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/nmap: fix build with bootlin-aarch64-glibc-old
@ 2026-10-24 20:31 Bernd Kuhls
  2026-10-24 20:31 ` [Buildroot] [PATCH 2/2] package/nmap: security bump version to 7.992 Bernd Kuhls
  2026-10-24 21:03 ` [Buildroot] [PATCH 1/2] package/nmap: fix build with bootlin-aarch64-glibc-old Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2026-10-24 20:31 UTC (permalink / raw)
  To: buildroot

Fixes a build error detected by the Gitlab pipelines which was
introduced by upstream commit
https://github.com/nmap/nmap/commit/8ef3ed1471eca613f1d43f602932d2c99d6e2e7c
that was first release in version 7.991. Buildroot bumped the package to
this version with commit 0691aac1de75377b3dd8d36965ab4a128d5e9cb1.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 .../0003-traceroute.cc-include-cstddef.patch  | 82 +++++++++++++++++++
 1 file changed, 82 insertions(+)
 create mode 100644 package/nmap/0003-traceroute.cc-include-cstddef.patch

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@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@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
+
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2/2] package/nmap: security bump version to 7.992
  2026-10-24 20:31 [Buildroot] [PATCH 1/2] package/nmap: fix build with bootlin-aarch64-glibc-old Bernd Kuhls
@ 2026-10-24 20:31 ` Bernd Kuhls
  2026-10-24 21:03 ` [Buildroot] [PATCH 1/2] package/nmap: fix build with bootlin-aarch64-glibc-old Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Bernd Kuhls @ 2026-10-24 20:31 UTC (permalink / raw)
  To: buildroot

https://github.com/nmap/nmap/blob/v7.992/CHANGELOG

Removed patch 0002 which is included in this release.
Renumbered patch 0003 to 0002.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/db7db3a90c3ad798d0c1017e4282af7faff98239

 ...if-compiling-without-Lua-support.-Cl.patch | 29 -------------------
 ... 0002-traceroute.cc-include-cstddef.patch} |  0
 package/nmap/nmap.hash                        |  6 ++--
 package/nmap/nmap.mk                          |  2 +-
 4 files changed, 4 insertions(+), 33 deletions(-)
 delete mode 100644 package/nmap/0002-Do-not-call-NSE-if-compiling-without-Lua-support.-Cl.patch
 rename package/nmap/{0003-traceroute.cc-include-cstddef.patch => 0002-traceroute.cc-include-cstddef.patch} (100%)

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
deleted file mode 100644
index 54cafdafbc..0000000000
--- a/package/nmap/0002-Do-not-call-NSE-if-compiling-without-Lua-support.-Cl.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 4c36cf12f246b52a8d510bdde8becd5c5b3bf8b5 Mon Sep 17 00:00:00 2001
-From: nnposter <nnposter@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@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/0002-traceroute.cc-include-cstddef.patch
similarity index 100%
rename from package/nmap/0003-traceroute.cc-include-cstddef.patch
rename to package/nmap/0002-traceroute.cc-include-cstddef.patch
diff --git a/package/nmap/nmap.hash b/package/nmap/nmap.hash
index bbdb81ec4f..f83880bae7 100644
--- a/package/nmap/nmap.hash
+++ b/package/nmap/nmap.hash
@@ -1,6 +1,6 @@
-# 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
+# From https://nmap.org/dist/sigs/nmap-7.992.tar.bz2.digest.txt (lowercase)
+sha256  0c12660eddbf7eabeff6996cb0c044a4eadf2bb0c6fbcb340d6cf72b1caee402  nmap-7.992.tar.bz2
+sha512  0c38610b78190b1865d5adb900e9bdc5813a29f6f5d47b768f4b1c9d0d36a26de476f7c7fc55b04e2421c6e6b149890ab0207ea1740786158bbf594a834fedc7  nmap-7.992.tar.bz2
 
 # Locally calculated
 sha256  9d9a9a763c0e6145172cfe7d8483e23b38ce60b6c79a82e4894242917bdae6d3  LICENSE
diff --git a/package/nmap/nmap.mk b/package/nmap/nmap.mk
index 0dd96d2b95..fc97989834 100644
--- a/package/nmap/nmap.mk
+++ b/package/nmap/nmap.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-NMAP_VERSION = 7.991
+NMAP_VERSION = 7.992
 NMAP_SITE = https://nmap.org/dist
 NMAP_SOURCE = nmap-$(NMAP_VERSION).tar.bz2
 NMAP_DEPENDENCIES = liblinear libpcap
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/nmap: fix build with bootlin-aarch64-glibc-old
  2026-10-24 20:31 [Buildroot] [PATCH 1/2] package/nmap: fix build with bootlin-aarch64-glibc-old Bernd Kuhls
  2026-10-24 20:31 ` [Buildroot] [PATCH 2/2] package/nmap: security bump version to 7.992 Bernd Kuhls
@ 2026-10-24 21:03 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-24 21:03 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

On Sat, Oct 24, 2026 at 10:31:07PM +0200, Bernd Kuhls wrote:
> Fixes a build error detected by the Gitlab pipelines which was
> introduced by upstream commit
> https://github.com/nmap/nmap/commit/8ef3ed1471eca613f1d43f602932d2c99d6e2e7c
> that was first release in version 7.991. Buildroot bumped the package to
> this version with commit 0691aac1de75377b3dd8d36965ab4a128d5e9cb1.
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Both applied to master, thanks!

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-24 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-24 20:31 [Buildroot] [PATCH 1/2] package/nmap: fix build with bootlin-aarch64-glibc-old Bernd Kuhls
2026-10-24 20:31 ` [Buildroot] [PATCH 2/2] package/nmap: security bump version to 7.992 Bernd Kuhls
2026-10-24 21:03 ` [Buildroot] [PATCH 1/2] package/nmap: fix build with bootlin-aarch64-glibc-old Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox