From 5f6f1039a5b219f96b16375ecde28213f7208966 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Wed, 19 Oct 2022 09:32:35 +0200 Subject: [PATCH] lseek OK --- lib/linux/lseek.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/linux/lseek.c b/lib/linux/lseek.c index b8ebffc5..3f60477f 100644 --- a/lib/linux/lseek.c +++ b/lib/linux/lseek.c @@ -24,25 +24,28 @@ #include #include -#if !__MESC__ && !__M2__ +#if !__MESC__ off_t _lseek (int filedes, off_t offset, int whence) { - long long_offset = offset; - return _sys_call3 (SYS_lseek, filedes, long_offset, whence); + return _sys_call3 (SYS_lseek, (int) filedes, (long) offset, (int) whence); + // long long_offset = offset; + // return _sys_call3 (SYS_lseek, filedes, long_offset, whence); } #endif off_t lseek (int filedes, off_t offset, int whence) { -#if !__MESC__ && !__M2__ +#if !__MESC__ if (_lseek (filedes, 0, SEEK_CUR) == -1) return -1; #endif - long long_offset = offset; size_t skip = __buffered_read_clear (filedes); if (whence == SEEK_CUR) offset -= skip; - return _sys_call3 (SYS_lseek, filedes, long_offset, whence); + //long long_offset = offset; + //return _sys_call3 (SYS_lseek, filedes, long_offset, whence); + //return _sys_call3 (SYS_lseek, (int) filedes, (long) offset, (int) whence); + return _sys_call3 (SYS_lseek, filedes, (long) offset, whence); }