summaryrefslogtreecommitdiff
path: root/userland/libc/sys/sendfile.c
blob: 818883b2d9c4d414908de337067ac032cad101bd (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}