You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.8 KiB

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