This commit is contained in:
Jan (janneke) Nieuwenhuizen 2022-10-19 08:21:14 +02:00
parent 54950f54bb
commit 87f0edc45b
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 7 additions and 3 deletions

View File

@ -32,7 +32,12 @@
#endif
#ifndef EOF
#define EOF -1
// FIXME M2_Planet chokes on -1, even inside #if ! __M2__
#if __arm__ || __i386__
#define EOF 0xffffffff
#else
#define EOF 0xffffffffffffffff
#endif
#endif
#ifndef NULL

View File

@ -27,10 +27,9 @@
off_t
lseek (int filedes, off_t offset, int whence)
{
long long_filedes = filedes;
long long_offset = offset;
size_t skip = __buffered_read_clear (filedes);
if (whence == SEEK_CUR)
offset -= skip;
return _sys_call3 (SYS_lseek, long_filedes, long_offset, whence);
return _sys_call3 (SYS_lseek, filedes, long_offset, whence);
}