aboutsummaryrefslogtreecommitdiff
path: root/net/nmap/patches/010-cxx.patch
blob: 8007b60ed9229f1ff791778882d8be911de7b975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
--- a/nmap_error.cc
+++ b/nmap_error.cc
@@ -135,6 +135,7 @@
 #include "xml.h"
 
 #include <errno.h>
+#include <time.h>
 
 extern NmapOps o;
 
--- a/nping/EchoServer.cc
+++ b/nping/EchoServer.cc
@@ -131,6 +131,7 @@
 #include "EchoServer.h"
 #include "EchoHeader.h"
 #include "NEPContext.h"
+#include <ctime>
 #include <vector>
 #include "nsock.h"
 #include "output.h"
@@ -281,12 +282,12 @@ int EchoServer::nep_listen_socket(){
         server_addr6.sin6_len = sizeof(struct sockaddr_in6);
     #endif
     /* Bind to local address and the specified port */
-    if( bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){
+    if( ::bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){
         nping_warning(QT_3, "Failed to bind to source address %s. Trying to bind to port %d...", IPtoa(server_addr6.sin6_addr), port);
         /* If the bind failed for the supplied address, just try again with in6addr_any */
         if( o.spoofSource() ){
             server_addr6.sin6_addr = in6addr_any;
-            if( bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){
+            if( ::bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){
                 nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno));
             }else{ 
                 nping_print(VB_1, "Server bound to port %d", port);
@@ -319,12 +320,12 @@ int EchoServer::nep_listen_socket(){
 #endif
 
     /* Bind to local address and the specified port */
-    if( bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){
+    if( ::bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){
         nping_warning(QT_3, "Failed to bind to source address %s. Trying to bind to port %d...", IPtoa(server_addr4.sin_addr), port);
         /* If the bind failed for the supplied address, just try again with in6addr_any */
         if( o.spoofSource() ){
             server_addr4.sin_addr.s_addr=INADDR_ANY;
-            if( bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){
+            if( ::bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){
                 nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno));
             }else{
                 nping_print(VB_1, "Server bound to port %d", port);
--- a/osscan.cc
+++ b/osscan.cc
@@ -151,6 +151,7 @@
 #endif
 
 #include <algorithm>
+#include <ctime>
 #include <list>
 #include <set>
 
--- a/osscan2.cc
+++ b/osscan2.cc
@@ -145,6 +145,7 @@
 
 #include "struct_ip.h"
 
+#include <ctime>
 #include <list>
 #include <math.h>
 
--- a/service_scan.cc
+++ b/service_scan.cc
@@ -173,6 +173,7 @@
 #endif
 
 #include <algorithm>
+#include <ctime>
 #include <list>
 
 extern NmapOps o;