xref: /OK3568_Linux_fs/buildroot/package/sedutil/0001-Common-log.h-time-2-needs-time.h.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From a7a48e1cda997afbfcdd985c594c3ec0516b6279 Mon Sep 17 00:00:00 2001
2From: Peter Korsgaard <peter@korsgaard.com>
3Date: Tue, 25 Sep 2018 22:49:58 +0200
4Subject: [PATCH] Common/log.h: time(2) needs <time.h>
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Otherwise the build fails with:
10
11In file included from ./linux/os.h:28:0,
12                 from Common/DtaOptions.cpp:20:
13./Common/log.h: In function ‘std::__cxx11::string NowTime()’:
14./Common/log.h:349:12: error: ‘time’ was not declared in this scope
15     time(&t);
16
17Upstream-status: https://github.com/Drive-Trust-Alliance/sedutil/pull/250
18Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
19---
20 Common/log.h | 1 +
21 1 file changed, 1 insertion(+)
22
23diff --git a/Common/log.h b/Common/log.h
24index 8c08c40..2b718ad 100644
25--- a/Common/log.h
26+++ b/Common/log.h
27@@ -341,6 +341,7 @@ inline std::string NowTime() {
28
29 #else
30
31+#include <time.h>
32 #include <sys/time.h>
33
34 inline std::string NowTime() {
35--
362.11.0
37
38