]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/src/unistd/x32/lseek.c
Update to musl 1.1.24.
[wasi-libc.git] / libc-top-half / musl / src / unistd / x32 / lseek.c
1 #include <unistd.h>
2 #include "syscall.h"
3
4 off_t __lseek(int fd, off_t offset, int whence)
5 {
6 off_t ret;
7 __asm__ __volatile__ ("syscall"
8 : "=a"(ret)
9 : "a"(SYS_lseek), "D"(fd), "S"(offset), "d"(whence)
10 : "rcx", "r11", "memory");
11 return ret < 0 ? __syscall_ret(ret) : ret;
12 }
13
14 weak_alias(__lseek, lseek);
15 weak_alias(__lseek, lseek64);