From fcae4fa15ddb9c69aecd1e095cbda1ec55bd30db Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 26 Oct 2015 16:16:02 +0000 Subject: [PATCH] Fix build failures under --without-liblua --- NmapOps.h | 1 + output.h | 1 + portlist.h | 2 ++ service_scan.h | 1 + targets.cc | 3 +-- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NmapOps.h b/NmapOps.h index a310ae01c..561d1ad04 100644 --- a/NmapOps.h +++ b/NmapOps.h @@ -131,6 +131,7 @@ #include #include #include +#include struct FingerPrintDB; struct FingerMatch; diff --git a/output.h b/output.h index 114439c93..17ada098e 100644 --- a/output.h +++ b/output.h @@ -168,6 +168,7 @@ #endif #include class PortList; +class Target; #include #include diff --git a/portlist.h b/portlist.h index 76f672841..5e777d59b 100644 --- a/portlist.h +++ b/portlist.h @@ -132,6 +132,8 @@ #include "portreasons.h" +#include + /* port states */ #define PORT_UNKNOWN 0 #define PORT_CLOSED 1 diff --git a/service_scan.h b/service_scan.h index 37373c3f5..1a697981f 100644 --- a/service_scan.h +++ b/service_scan.h @@ -128,6 +128,7 @@ #define SERVICE_SCAN_H #include "portlist.h" +#include "nmap.h" #include diff --git a/targets.cc b/targets.cc index 38c1f819f..682244f0b 100644 --- a/targets.cc +++ b/targets.cc @@ -463,8 +463,6 @@ void HostGroupState::undefer() { } const char *HostGroupState::next_expression() { - static char buf[1024]; - if (o.max_ips_to_scan == 0 || o.numhosts_scanned + this->current_batch_sz < o.max_ips_to_scan) { const char *expr; expr = grab_next_host_spec(o.inputfd, o.generate_random_ips, this->argc, this->argv); @@ -474,6 +472,7 @@ const char *HostGroupState::next_expression() { #ifndef NOLUA /* Add any new NSE discovered targets to the scan queue */ + static char buf[1024]; NewTargets *new_targets = NewTargets::get(); if (o.script && new_targets != NULL) {