summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-12-19 00:02:20 -0500
committerNathan Binkert <binkertn@umich.edu>2003-12-19 00:02:20 -0500
commit255ac8372d18887dc9289b6715c700b2f5c26502 (patch)
treec61a6772e7ac242774c02c1746cc0edb1b9cc1b3 /dev
parent888ea0dfd9caa155529b34698b2b1878d963921c (diff)
downloadgem5-255ac8372d18887dc9289b6715c700b2f5c26502.tar.xz
Make stuff build on openbsd
arch/alpha/alpha_tru64_process.cc: So, I don't know why linux uses an off_t here. I'm also not sure why linux defines an off_t to be a long Let's just use long here since it works for linux, and that's what bsd does base/inifile.cc: correct #include for OpenBSD dev/disk_image.cc: the correct type for this is streampos --HG-- extra : convert_revision : f3ac3a3b8515d66e07ffb9780d8a9e387297b6a0
Diffstat (limited to 'dev')
-rw-r--r--dev/disk_image.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/dev/disk_image.cc b/dev/disk_image.cc
index cbcd16a25..02c8b50b6 100644
--- a/dev/disk_image.cc
+++ b/dev/disk_image.cc
@@ -109,7 +109,7 @@ RawDiskImage::read(uint8_t *data, off_t offset) const
if (stream.seekg(offset * SectorSize, ios::beg) < 0)
panic("Could not seek to location in file");
- off_t pos = stream.tellg();
+ streampos pos = stream.tellg();
stream.read((char *)data, SectorSize);
DPRINTF(DiskImageRead, "read: offset=%d\n", (uint64_t)offset);
@@ -136,7 +136,7 @@ RawDiskImage::write(const uint8_t *data, off_t offset)
DPRINTF(DiskImageWrite, "write: offset=%d\n", (uint64_t)offset);
DDUMP(DiskImageWrite, data, SectorSize);
- off_t pos = stream.tellp();
+ streampos pos = stream.tellp();
stream.write((const char *)data, SectorSize);
return stream.tellp() - pos;
}