1/* 2** Copyright 2001, Manuel J. Petit. All rights reserved. 3** Distributed under the terms of the NewOS License. 4*/ 5 6#include <unistd.h> 7 8#include <errno.h> 9 10#include <errno_private.h> 11#include <syscalls.h> 12 13 14off_t 15lseek(int fd, off_t pos, int whence) 16{ 17 off_t result = _kern_seek(fd, pos, whence); 18 if (result < 0) { 19 __set_errno(result); 20 return -1; 21 } 22 return result; 23} 24