diff options
Diffstat (limited to 'userland/libc/sys/sendfile.c')
-rw-r--r-- | userland/libc/sys/sendfile.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/userland/libc/sys/sendfile.c b/userland/libc/sys/sendfile.c new file mode 100644 index 0000000..818883b --- /dev/null +++ b/userland/libc/sys/sendfile.c @@ -0,0 +1,12 @@ +#include <sys/sendfile.h> +#include <syscall.h> +#include <errno.h> + +u32 sendfile(int out_fd, int in_fd, off_t *offset, size_t count, + int *error_rc) { + u32 r = syscall(SYS_SENDFILE, out_fd, in_fd, offset, count, error_rc); + if (error_rc) { + errno = -1 * *error_rc; + } + return r; +} |