From: Nathan Binkert Date: Sat, 11 Oct 2003 02:59:51 +0000 (-0400) Subject: Make things work on OpenBSD again X-Git-Tag: m5_1.0_beta1~48 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b61ec9773acf7ea2ead87fc68449d6587a7da88d;p=gem5.git 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 for sprintf --HG-- extra : convert_revision : a230aa691bb798c37243fe4253399b2e40a2d12d --- diff --git a/base/remote_gdb.cc b/base/remote_gdb.cc index 0289f29db..a7893cdf7 100644 --- a/base/remote_gdb.cc +++ b/base/remote_gdb.cc @@ -91,6 +91,7 @@ #include +#include #include #include "cpu/exec_context.hh" 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 + #include namespace Time {