From db39ee051821355b19630e4cfd148d97278a8abc Mon Sep 17 00:00:00 2001 From: nnposter Date: Wed, 20 Apr 2022 17:09:55 +0000 Subject: [PATCH] Add missing includes to route.h test for FreeBSD. Fixes #2379 --- CHANGELOG | 3 +++ libdnet-stripped/NMAP_MODIFICATIONS | 12 ++++++++++++ libdnet-stripped/configure | 1 + libdnet-stripped/configure.in | 1 + 4 files changed, 17 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index b8959e84b..7751489eb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ #Nmap Changelog ($Id$); -*-text-*- +o [GH#2379] Nmap and Nping were unable to obtain system routes on FreeBSD + [benpratt, nnposter] + o [GH#2464] Script ipidseq was broken due to calling an unreachable library function. [nnposter] diff --git a/libdnet-stripped/NMAP_MODIFICATIONS b/libdnet-stripped/NMAP_MODIFICATIONS index 25b3e8437..adb143ed1 100644 --- a/libdnet-stripped/NMAP_MODIFICATIONS +++ b/libdnet-stripped/NMAP_MODIFICATIONS @@ -2561,3 +2561,15 @@ index c69b29b..8a9d2bc 100644 if (r->ipftable != NULL) free(r->ipftable); if (r->ipftable2 != NULL) +o Additional fix for route detection on FreeBSD 11, where net/route.h + requires sys/types.h +--- a/libdnet-stripped/configure.in 2020-10-14 21:08:09.275534843 -0600 ++++ b/libdnet-stripped/configure.in 2022-03-23 18:02:44.842111434 -0600 +@@ -177,6 +177,7 @@ + AC_CHECK_HEADERS(hpsecurity.h stropts.h) + AC_CHECK_HEADERS(net/route.h, [], [], + [ ++AC_INCLUDES_DEFAULT + #ifdef HAVE_SYS_SOCKET_H + #include + #endif diff --git a/libdnet-stripped/configure b/libdnet-stripped/configure index cf8959967..dc74081d7 100755 --- a/libdnet-stripped/configure +++ b/libdnet-stripped/configure @@ -11351,6 +11351,7 @@ done for ac_header in net/route.h do : ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" " +$ac_includes_default #ifdef HAVE_SYS_SOCKET_H #include #endif diff --git a/libdnet-stripped/configure.in b/libdnet-stripped/configure.in index 95abd53f8..6235dc216 100644 --- a/libdnet-stripped/configure.in +++ b/libdnet-stripped/configure.in @@ -177,6 +177,7 @@ else AC_CHECK_HEADERS(hpsecurity.h stropts.h) AC_CHECK_HEADERS(net/route.h, [], [], [ +AC_INCLUDES_DEFAULT #ifdef HAVE_SYS_SOCKET_H #include #endif