Make things work on OpenBSD again
authorNathan Binkert <binkertn@umich.edu>
Sat, 11 Oct 2003 02:59:51 +0000 (22:59 -0400)
committerNathan Binkert <binkertn@umich.edu>
Sat, 11 Oct 2003 02:59:51 +0000 (22:59 -0400)
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

base/remote_gdb.cc
sim/sim_time.cc
sim/sim_time.hh

index 0289f29db60426fe8a0c4b7fdc850701fc4810ee..a7893cdf715e470f10dce2da262fd478b4651591 100644 (file)
@@ -91,6 +91,7 @@
 
 #include <unistd.h>
 
+#include <cstdio>
 #include <string>
 
 #include "cpu/exec_context.hh"
index 3d91eba834108ee7e362d95ddd1ea7091edb7506..70483d9a29079d058c13fa6b55924ce80d69a6bf 100644 (file)
@@ -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;
     }
 }
index dbba42aa7ec27d3cef92e0620087bd46d074f534..af69c33211bbf2a53b05fe74ca77a41a298ec219 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef __SIM_TIME_HH__
 #define __SIM_TIME_HH__
 
+#include <sys/time.h>
+
 #include <iosfwd>
 
 namespace Time {