diff --git a/Target.h b/Target.h index 48fda5523..86109ecec 100644 --- a/Target.h +++ b/Target.h @@ -151,6 +151,7 @@ class FingerPrintResults; #include #include +#include /* time_t */ #ifndef INET6_ADDRSTRLEN #define INET6_ADDRSTRLEN 46 diff --git a/nmap_error.cc b/nmap_error.cc index df7f083cd..0974bac85 100644 --- a/nmap_error.cc +++ b/nmap_error.cc @@ -135,6 +135,16 @@ #include "xml.h" #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif extern NmapOps o; diff --git a/nmap_tty.cc b/nmap_tty.cc index 514d17f96..8f6bc9628 100644 --- a/nmap_tty.cc +++ b/nmap_tty.cc @@ -148,6 +148,17 @@ #endif #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + #include "nmap_tty.h" #include "NmapOps.h" diff --git a/nse_ssl_cert.cc b/nse_ssl_cert.cc index b6aae7c4c..2c067b8ff 100644 --- a/nse_ssl_cert.cc +++ b/nse_ssl_cert.cc @@ -158,6 +158,8 @@ #define X509_get0_notAfter X509_get_notAfter #endif +/* struct tm */ +#include #include "nse_lua.h" diff --git a/osscan.cc b/osscan.cc index 8bdd60588..03dde8003 100644 --- a/osscan.cc +++ b/osscan.cc @@ -139,16 +139,7 @@ #include #include -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif +#include #include #include diff --git a/output.h b/output.h index ddbd1d136..b6afc4293 100644 --- a/output.h +++ b/output.h @@ -180,6 +180,17 @@ class Target; #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + #ifdef WIN32 /* Show a fatal error explaining that an interface is not Ethernet and won't work on Windows. Do nothing if --send-ip (PACKET_SEND_IP_STRONG) was used. */