summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/alpha_tru64_process.cc2
-rw-r--r--base/inifile.cc3
-rw-r--r--dev/disk_image.cc4
3 files changed, 6 insertions, 3 deletions
diff --git a/arch/alpha/alpha_tru64_process.cc b/arch/alpha/alpha_tru64_process.cc
index f411e594d..ccf4d4d6c 100644
--- a/arch/alpha/alpha_tru64_process.cc
+++ b/arch/alpha/alpha_tru64_process.cc
@@ -629,7 +629,7 @@ class Tru64 {
// just pass basep through uninterpreted.
TypedBufferArg<int64_t> basep(tgt_basep);
basep.copyIn(xc->mem);
- ::off_t host_basep = (off_t)*basep;
+ long host_basep = (off_t)*basep;
int host_result = getdirentries(fd, host_buf, tgt_nbytes, &host_basep);
// check for error
diff --git a/base/inifile.cc b/base/inifile.cc
index 2717a534d..74d47204e 100644
--- a/base/inifile.cc
+++ b/base/inifile.cc
@@ -35,6 +35,9 @@
#include <sys/types.h>
#include <sys/wait.h>
+#if defined(__OpenBSD__)
+#include <libgen.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
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;
}