Nmap Development mailing list archives
[PATCH] Fix compilation failure with ./configure --without-liblua
From: Kris Katterjohn <katterjohn () gmail com>
Date: Wed, 03 Jan 2007 12:56:15 -0600
The attached patch wraps lonesome o.script* with #ifndef NOLUA in nmap.cc and output.cc which causes the compilation to fail when ./configure'd with --without-liblua. It now compiles fine for me with and without --without-liblua. It's a diff against 4.21ALPHA1 (of course) Thanks, Kris Katterjohn
--- x/nmap.cc 2006-12-10 18:34:36.000000000 -0600 +++ y/nmap.cc 2007-01-03 12:40:46.000000000 -0600 @@ -739,7 +739,9 @@ int nmap_main(int argc, char *argv[]) { o.osscan_guess = 1; } else if (optcmp(long_options[option_index].name, "packet-trace") == 0) { o.setPacketTrace(true); +#ifndef NOLUA o.scripttrace = 1; +#endif } else if (optcmp(long_options[option_index].name, "version-trace") == 0) { o.setVersionTrace(true); o.debugging++; @@ -833,7 +835,9 @@ int nmap_main(int argc, char *argv[]) { break; case 'A': o.servicescan = true; +#ifndef NOLUA o.script = 1; +#endif if (o.isr00t) o.osscan = OS_SCAN_DEFAULT; break; @@ -1436,11 +1440,13 @@ int nmap_main(int argc, char *argv[]) { // if (num_host_exp_groups == 0) // fatal("No target machines/networks specified!"); +#ifndef NOLUA if(o.scriptupdatedb) { script_updatedb(); // disable warnings o.max_ips_to_scan = o.numhosts_scanned; } +#endif hstate = new HostGroupState(o.ping_group_sz, o.randomize_hosts, host_exp_group, num_host_exp_groups); @@ -1605,7 +1611,9 @@ int nmap_main(int argc, char *argv[]) { if (o.servicescan) { o.current_scantype = SERVICE_SCAN; +#ifndef NOLUA o.scriptversion = 1; +#endif keyWasPressed(); // Check if a status message should be printed service_scan(Targets); --- x/output.cc 2006-12-10 18:34:36.000000000 -0600 +++ y/output.cc 2007-01-03 12:41:42.000000000 -0600 @@ -1691,7 +1691,11 @@ void printfinaloutput() { gettimeofday(&tv, NULL); timep = time(NULL); - if (o.numhosts_scanned == 0 && o.scriptupdatedb == 0) + if (o.numhosts_scanned == 0 +#ifndef NOLUA + && o.scriptupdatedb == 0 +#endif + ) fprintf(stderr, "WARNING: No targets were specified, so 0 hosts scanned.\n"); if (o.numhosts_scanned == 1 && o.numhosts_up == 0 && !o.listscan && o.pingtype != PINGTYPE_NONE)
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCH] Fix compilation failure with ./configure --without-liblua Kris Katterjohn (Jan 03)