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---
7Upstream-Status: Pending
8
9 nmap_error.cc       | 11 +----------
10 nping/EchoServer.cc |  1 +
11 osscan2.cc          |  1 +
12 service_scan.cc     |  1 +
13 4 files changed, 4 insertions(+), 10 deletions(-)
14
15diff --git a/nmap_error.cc b/nmap_error.cc
16index 588b13c33..254107ff5 100644
17--- a/nmap_error.cc
18+++ b/nmap_error.cc
19@@ -135,16 +135,7 @@
20 #include "xml.h"
21
22 #include <errno.h>
23-#if TIME_WITH_SYS_TIME
24-# include <sys/time.h>
25-# include <time.h>
26-#else
27-# if HAVE_SYS_TIME_H
28-#  include <sys/time.h>
29-# else
30-#  include <time.h>
31-# endif
32-#endif
33+#include <time.h>
34
35 extern NmapOps o;
36
37diff --git a/nping/EchoServer.cc b/nping/EchoServer.cc
38index ccdcf9c2d..c403aeda5 100644
39--- a/nping/EchoServer.cc
40+++ b/nping/EchoServer.cc
41@@ -137,6 +137,7 @@
42 #include "NpingOps.h"
43 #include "ProbeMode.h"
44 #include <signal.h>
45+#include <time.h>
46
47 extern NpingOps o;
48 extern EchoServer es;
49diff --git a/osscan2.cc b/osscan2.cc
50index aa31feb12..89673e108 100644
51--- a/osscan2.cc
52+++ b/osscan2.cc
53@@ -147,6 +147,7 @@
54
55 #include <list>
56 #include <math.h>
57+#include <time.h>
58
59 extern NmapOps o;
60 #ifdef WIN32
61diff --git a/service_scan.cc b/service_scan.cc
62index 57a92ed28..ef277bb1f 100644
63--- a/service_scan.cc
64+++ b/service_scan.cc
65@@ -145,6 +145,7 @@
66 #include "nmap_tty.h"
67
68 #include <errno.h>
69+#include <time.h>
70
71 #if HAVE_OPENSSL
72 /* OpenSSL 1.0.0 needs _WINSOCKAPI_ to be defined, otherwise it loads
73--
742.21.0
75
76