From 2fbe9507bfba58a6a000d231fe735bad1f245b55 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 24 Apr 2021 14:40:43 -0400 Subject: sim: callback: convert FS interfaces to 64-bit Rather than rely on off_t being the right size between the host & target, have the interface always be 64-bit. We can figure out if we need to truncate when actually outputting it to the right target. --- sim/common/callback.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sim/common/callback.c') diff --git a/sim/common/callback.c b/sim/common/callback.c index fb5e864..24ea470 100644 --- a/sim/common/callback.c +++ b/sim/common/callback.c @@ -205,10 +205,10 @@ os_isatty (host_callback *p, int fd) return result; } -static int -os_lseek (host_callback *p, int fd, long off, int way) +static int64_t +os_lseek (host_callback *p, int fd, int64_t off, int way) { - int result; + int64_t result; result = fdbad (p, fd); if (result) @@ -519,7 +519,7 @@ os_lstat (host_callback *p, const char *file, struct stat *buf) } static int -os_ftruncate (host_callback *p, int fd, long len) +os_ftruncate (host_callback *p, int fd, int64_t len) { int result; @@ -542,7 +542,7 @@ os_ftruncate (host_callback *p, int fd, long len) } static int -os_truncate (host_callback *p, const char *file, long len) +os_truncate (host_callback *p, const char *file, int64_t len) { #ifdef HAVE_TRUNCATE int result; -- cgit v1.1