1From a068952a20880fc864e8cb8b49f8a6b143a5ac30 Mon Sep 17 00:00:00 2001
2From: Peiran Hong <peiran.hong@windriver.com>
3Date: Fri, 20 Sep 2019 15:02:45 -0400
4Subject: [PATCH] Include time.h header to pass clang compilation
5
6---
7 nmap_error.cc       | 11 +----------
8 nping/EchoServer.cc |  1 +
9 osscan2.cc          |  1 +
10 service_scan.cc     |  1 +
11 4 files changed, 4 insertions(+), 10 deletions(-)
12
13diff --git a/nmap_error.cc b/nmap_error.cc
14index 588b13c33..254107ff5 100644
15--- a/nmap_error.cc
16+++ b/nmap_error.cc
17@@ -135,16 +135,7 @@
18 #include "xml.h"
19
20 #include <errno.h>
21-#if TIME_WITH_SYS_TIME
22-# include <sys/time.h>
23-# include <time.h>
24-#else
25-# if HAVE_SYS_TIME_H
26-#  include <sys/time.h>
27-# else
28-#  include <time.h>
29-# endif
30-#endif
31+#include <time.h>
32
33 extern NmapOps o;
34
35diff --git a/nping/EchoServer.cc b/nping/EchoServer.cc
36index ccdcf9c2d..c403aeda5 100644
37--- a/nping/EchoServer.cc
38+++ b/nping/EchoServer.cc
39@@ -137,6 +137,7 @@
40 #include "NpingOps.h"
41 #include "ProbeMode.h"
42 #include <signal.h>
43+#include <time.h>
44
45 extern NpingOps o;
46 extern EchoServer es;
47diff --git a/osscan2.cc b/osscan2.cc
48index aa31feb12..89673e108 100644
49--- a/osscan2.cc
50+++ b/osscan2.cc
51@@ -147,6 +147,7 @@
52
53 #include <list>
54 #include <math.h>
55+#include <time.h>
56
57 extern NmapOps o;
58 #ifdef WIN32
59diff --git a/service_scan.cc b/service_scan.cc
60index 57a92ed28..ef277bb1f 100644
61--- a/service_scan.cc
62+++ b/service_scan.cc
63@@ -145,6 +145,7 @@
64 #include "nmap_tty.h"
65
66 #include <errno.h>
67+#include <time.h>
68
69 #if HAVE_OPENSSL
70 /* OpenSSL 1.0.0 needs _WINSOCKAPI_ to be defined, otherwise it loads
71--
722.21.0
73
74