diff options
author | Ian Moffett <ian@osmora.org> | 2025-10-17 20:02:30 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-10-17 20:03:48 -0400 |
commit | 3de9458c5495d67e1c56f44ef8da9850d64087d0 (patch) | |
tree | 2214cd94468ea8a4bc0448ce921b3d56a9149490 /src/lib/libc/include | |
parent | 0d8e681dcc30774930c373632150b266ce782a14 (diff) |
libc: unistd: Add lseek system call interface
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/lib/libc/include')
-rw-r--r-- | src/lib/libc/include/unistd.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 <sys/seek.h> #include <stddef.h> /* 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 */ |