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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#ifndef __SIM_TIME_HH__
|
||||
#define __SIM_TIME_HH__
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
namespace Time {
|
||||
|
||||
Reference in New Issue
Block a user