summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-10-10 22:59:51 -0400
committerNathan Binkert <binkertn@umich.edu>2003-10-10 22:59:51 -0400
commitb61ec9773acf7ea2ead87fc68449d6587a7da88d (patch)
tree1b93264bf6afcdf7ca3e26e8096ea870ebf5a49c /sim
parent6770411543d9ca44dc632cd4486635f8213b3a1b (diff)
downloadgem5-b61ec9773acf7ea2ead87fc68449d6587a7da88d.tar.xz
Make things work on OpenBSD again
sim/sim_time.cc: make this work in OpenBSD sim/sim_time.hh: timeval is defined in sys/time.h base/remote_gdb.cc: need to include <cstdio> for sprintf --HG-- extra : convert_revision : a230aa691bb798c37243fe4253399b2e40a2d12d
Diffstat (limited to 'sim')
-rw-r--r--sim/sim_time.cc6
-rw-r--r--sim/sim_time.hh2
2 files changed, 5 insertions, 3 deletions
diff --git a/sim/sim_time.cc b/sim/sim_time.cc
index 3d91eba83..70483d9a2 100644
--- a/sim/sim_time.cc
+++ b/sim/sim_time.cc
@@ -132,21 +132,21 @@ namespace Time
ostream &
operator<<(ostream &out, const Start &start)
{
- out << ::ctime(&start.get().tv_sec);
+ out << ::ctime((const time_t *)&start.get().tv_sec);
return out;
}
ostream &
operator<<(ostream &out, const Now &now)
{
- out << ::ctime(&now.get().tv_sec);
+ out << ::ctime((const time_t *)&now.get().tv_sec);
return out;
}
ostream &
operator<<(ostream &out, const Elapsed &elapsed)
{
- out << ::ctime(&elapsed.get().tv_sec);
+ out << ::ctime((const time_t *)&elapsed.get().tv_sec);
return out;
}
}
diff --git a/sim/sim_time.hh b/sim/sim_time.hh
index dbba42aa7..af69c3321 100644
--- a/sim/sim_time.hh
+++ b/sim/sim_time.hh
@@ -29,6 +29,8 @@
#ifndef __SIM_TIME_HH__
#define __SIM_TIME_HH__
+#include <sys/time.h>
+
#include <iosfwd>
namespace Time {