logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git

sendfile_linux.c (400B)


  1. // utils-std: Collection of commonly available Unix tools
  2. // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. // SPDX-License-Identifier: MPL-2.0
  4. // Because that's what our utilities will use :)
  5. #define _POSIX_C_SOURCE 200809L
  6. #include <sys/sendfile.h>
  7. ssize_t
  8. test(int in, int out, size_t len)
  9. {
  10. off_t *offset = NULL;
  11. return sendfile(out, in, offset, len);
  12. }