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