From 9725791024d159ba0c5b6e8eef13a0e9077523a9 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Thu, 20 Jun 2024 23:13:51 +0200 Subject: Add getaddrinfo and change other libc stuff --- userland/libc/unistd/lseek.c | 4 ++-- userland/libc/unistd/write.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'userland/libc/unistd') diff --git a/userland/libc/unistd/lseek.c b/userland/libc/unistd/lseek.c index 2dcd661..b9ebfae 100644 --- a/userland/libc/unistd/lseek.c +++ b/userland/libc/unistd/lseek.c @@ -1,7 +1,7 @@ #include -#include #include +#include -off_t lseek(int fildes, off_t offset, int whence) { +int lseek(int fildes, int offset, int whence) { RC_ERRNO(syscall(SYS_LSEEK, (u32)fildes, offset, whence, 0, 0)); } diff --git a/userland/libc/unistd/write.c b/userland/libc/unistd/write.c index 661fb01..0dd1824 100644 --- a/userland/libc/unistd/write.c +++ b/userland/libc/unistd/write.c @@ -1,6 +1,7 @@ #include #include +#include int write(int fd, const char *buf, size_t count) { - return syscall(SYS_WRITE, fd, buf, count, 0, 0); + RC_ERRNO(syscall(SYS_WRITE, fd, buf, count, 0, 0)); } -- cgit v1.2.3