aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorN. Engelhardt <nak@symbioticeda.com>2020-10-21 17:47:00 +0200
committerN. Engelhardt <nak@symbioticeda.com>2020-10-21 17:47:00 +0200
commit1c96a0b1d5da678a86e9d3b1b1f56390d38600f3 (patch)
tree0788a011136567eba24d56be8e7bf85d57632638 /passes
parenteccc48c39f258cb0a9d5e176616d848f77f49565 (diff)
downloadyosys-1c96a0b1d5da678a86e9d3b1b1f56390d38600f3.tar.gz
yosys-1c96a0b1d5da678a86e9d3b1b1f56390d38600f3.tar.bz2
yosys-1c96a0b1d5da678a86e9d3b1b1f56390d38600f3.zip
use strftime instead of put_time for gcc 4.8 compatibility
Diffstat (limited to 'passes')
-rw-r--r--passes/sat/sim.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/passes/sat/sim.cc b/passes/sat/sim.cc
index dad0d0c24..3d2081a74 100644
--- a/passes/sat/sim.cc
+++ b/passes/sat/sim.cc
@@ -22,7 +22,6 @@
#include "kernel/celltypes.h"
#include <ctime>
-#include <iomanip>
USING_YOSYS_NAMESPACE
PRIVATE_NAMESPACE_BEGIN
@@ -649,10 +648,12 @@ struct SimWorker : SimShared
return;
vcdfile << stringf("$version %s $end\n", yosys_version_str);
- vcdfile << stringf("$date ");
+
std::time_t t = std::time(nullptr);
- vcdfile << std::put_time(std::localtime(&t), "%c %Z");
- vcdfile << stringf(" $end\n");
+ char mbstr[255];
+ if (std::strftime(mbstr, sizeof(mbstr), "%c", std::localtime(&t))) {
+ vcdfile << stringf("$date ") << mbstr << stringf(" $end\n");
+ }
if (!timescale.empty())
vcdfile << stringf("$timescale %s $end\n", timescale.c_str());