headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / libroot / posix / unistd / lseek.c
blobff3ff0f0fef2bc5d2961ad085c928cb0f0203edc
1 /*
2 ** Copyright 2001, Manuel J. Petit. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
6 #include <unistd.h>
8 #include <errno.h>
10 #include <errno_private.h>
11 #include <syscalls.h>
14 off_t
15 lseek(int fd, off_t pos, int whence)
17 off_t result = _kern_seek(fd, pos, whence);
18 if (result < 0) {
19 __set_errno(result);
20 return -1;
22 return result;