]> git.pld-linux.org Git - packages/nmap.git/blob - nmap-nolua.patch
- fix without lua bcond
[packages/nmap.git] / nmap-nolua.patch
1 --- a/output.h
2 +++ b/output.h
3 @@ -226,6 +226,10 @@
4  void printscriptresults(ScriptResults *scriptResults, stype scantype);
5  
6  void printhostscriptresults(Target *currenths);
7 +
8 +/*This is a helper function to determine the ordering of the script results
9 +  based on their id */
10 +bool comparescriptids(ScriptResult first, ScriptResult second);
11  #endif
12  
13  /* Print a table with traceroute hops. */
14 @@ -253,8 +257,4 @@
15     were found. */
16  void printdatafilepaths();
17  
18 -/*This is a helper function to determine the ordering of the script results
19 -  based on their id */
20 -bool comparescriptids(ScriptResult first, ScriptResult second);
21 -
22  #endif /* OUTPUT_H */
23 --- a/output.cc
24 +++ b/output.cc
25 @@ -2613,6 +2613,7 @@
26    }
27  }
28  
29 +#ifndef NOLUA
30  /*This is a helper function to determine the ordering of the script results
31    based on their id */
32  bool comparescriptids(ScriptResult first, ScriptResult second){
33 @@ -2625,5 +2626,6 @@
34      else
35          return false;
36  }
37 +#endif
38  
39  
40 --- a/portlist.cc
41 +++ b/portlist.cc
42 @@ -144,6 +144,7 @@
43    }
44  }
45  
46 +#ifndef NOLUA
47  void Port::freeScriptResults(void)
48  {
49      while (!scriptResults.empty()) {
50 @@ -151,6 +152,7 @@
51          scriptResults.pop_front();
52      }
53  }
54 +#endif
55  
56  /* Fills in namebuf (as long as there is space in buflen) with the
57     Name nmap normal output will use to describe the port.  This takes
58 --- a/Target.cc
59 +++ b/Target.cc
60 @@ -162,10 +162,12 @@
61  
62  Target::~Target() {
63    FreeInternal();
64 +#ifndef NOLUA
65    while (!scriptResults.empty()) {
66      scriptResults.front().clear();
67      scriptResults.pop_front();
68    }
69 +#endif
70  }
71  
72  void Target::FreeInternal() {
This page took 0.080076 seconds and 3 git commands to generate.