summaryrefslogtreecommitdiff
path: root/src/libmach/windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmach/windows.c')
-rw-r--r--src/libmach/windows.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libmach/windows.c b/src/libmach/windows.c
index 81fa6b6d2..aea7bace0 100644
--- a/src/libmach/windows.c
+++ b/src/libmach/windows.c
@@ -48,8 +48,12 @@ procthreadpids(int pid, int *p, int np)
int
pread(int fd, void *buf, int count, int offset)
{
- sysfatal("pread unimplemented in Windows");
- return -1;
+ int oldoffset, n;
+
+ oldoffset = seek(fd, offset, 0);
+ n = read(fd, buf, count);
+ seek(fd, oldoffset, 0);
+ return n;
}
int