X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Funistd%2Flseek.c;h=0a5ed392bc03c231208933ff3c2376bcfcb5f3b3;hb=5652d70054daf3c2c9b6d475fdf9d24a940e51aa;hp=0dab2679196e9c840d1f85034ca8a09f39a36139;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/unistd/lseek.c b/src/unistd/lseek.c index 0dab2679..0a5ed392 100644 --- a/src/unistd/lseek.c +++ b/src/unistd/lseek.c @@ -4,13 +4,12 @@ off_t lseek(int fd, off_t offset, int whence) { - /* optimized away at compiletime */ - if (sizeof(long) == 8) - return syscall3(__NR_lseek, fd, offset, whence); - else { - off_t result; - return syscall5(__NR__llseek, fd, offset>>32, offset, (long)&result, whence) ? -1 : result; - } +#ifdef SYS__llseek + off_t result; + return syscall(SYS__llseek, fd, offset>>32, offset, &result, whence) ? -1 : result; +#else + return syscall(SYS_lseek, fd, offset, whence); +#endif } LFS64(lseek);