blob: 0152866f8df42302f9bfb947796fef3c423dbb6a [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#include <unistd.h>
2#include "syscall.h"
3#include "libc.h"
4
5off_t lseek(int fd, off_t offset, int whence)
6{
Rich Felker2cdfb7c2011-02-13 22:45:42 -05007#ifdef __NR__llseek
8 off_t result;
9 return syscall5(__NR__llseek, fd, offset>>32, offset, (long)&result, whence) ? -1 : result;
10#else
11 return syscall3(__NR_lseek, fd, offset, whence);
12#endif
Rich Felker0b44a032011-02-12 00:22:29 -050013}
14
15LFS64(lseek);