From 3de9458c5495d67e1c56f44ef8da9850d64087d0 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 17 Oct 2025 20:02:30 -0400 Subject: libc: unistd: Add lseek system call interface Signed-off-by: Ian Moffett --- src/lib/libc/include/unistd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib/libc/include') diff --git a/src/lib/libc/include/unistd.h b/src/lib/libc/include/unistd.h index b668d5b..61b437c 100644 --- a/src/lib/libc/include/unistd.h +++ b/src/lib/libc/include/unistd.h @@ -30,6 +30,7 @@ #ifndef _UNISTD_H #define _UNISTD_H 1 +#include #include /* Standard stream file numbers */ @@ -74,4 +75,13 @@ ssize_t write(int fd, const void *buf, size_t count); */ ssize_t read(int fd, void *buf, size_t count); +/* + * Reposition the file offset of a file + * + * @fd: File descriptor to reposition + * @offset: Offset to move `fd' to + * @whence: How it should be repositioned + */ +off_t lseek(int fd, off_t offset, int whence); + #endif /* _UNISTD_H */ -- cgit v1.2.3