• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <unistd.h>
2 #include "syscall.h"
3 
__lseek(int fd,off_t offset,int whence)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);
16