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); }