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