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