From 03919b26ed41c31876db41f7cee076ced4513fad Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 16 Jul 2019 18:31:33 -0400 Subject: use namespace-safe __lseek for __stdio_seek instead of direct syscall this probably saves a few bytes, avoids duplicating the clunky lseek/_llseek syscall convention in two places, and sets the stage for fixing broken seeks on x32 and mipsn32. --- src/stdio/__stdio_seek.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/stdio') diff --git a/src/stdio/__stdio_seek.c b/src/stdio/__stdio_seek.c index 13e06a66..326ab9bc 100644 --- a/src/stdio/__stdio_seek.c +++ b/src/stdio/__stdio_seek.c @@ -1,13 +1,7 @@ #include "stdio_impl.h" +#include off_t __stdio_seek(FILE *f, off_t off, int whence) { - off_t ret; -#ifdef SYS__llseek - if (syscall(SYS__llseek, f->fd, off>>32, off, &ret, whence)<0) - ret = -1; -#else - ret = syscall(SYS_lseek, f->fd, off, whence); -#endif - return ret; + return __lseek(f->fd, off, whence); } -- cgit v1.2.1