@@ -32,6 +32,5 @@ typedef signed long off_t;
typedef signed long blksize_t;
typedef signed long blkcnt_t;
typedef signed long time_t;
-typedef long long loff_t;
#endif /* _NOLIBC_STD_H */
@@ -671,26 +671,7 @@ int link(const char *old, const char *new)
static __attribute__((unused))
off_t sys_lseek(int fd, off_t offset, int whence)
{
-#ifdef __NR_lseek
return my_syscall3(__NR_lseek, fd, offset, whence);
-#elif defined(__NR_llseek)
- loff_t res;
- off_t retval;
-
- int rc = my_syscall5(__NR_llseek, fd, (long) (((uint64_t) (offset)) >> 32), (long) offset, &res, whence);
-
- if (rc)
- return rc;
-
- retval = (off_t) res;
- if (retval == res)
- return retval;
-
- SET_ERRNO(EOVERFLOW);
- return (off_t) -1;
-#else
-#error Neither __NR_lseek nor __NR_llseek defined, cannot implement sys_lseek()
-#endif
}
static __attribute__((unused))
This reverts commit d2c3acba6d66 to prepare for a whole new patch later. Signed-off-by: Zhangjin Wu <falcon@tinylab.org> --- tools/include/nolibc/std.h | 1 - tools/include/nolibc/sys.h | 19 ------------------- 2 files changed, 20 deletions(-)