| 1 | /************************************************* |
| 2 | * Exim - an Internet mail transport agent * |
| 3 | *************************************************/ |
| 4 | |
| 5 | /* Copyright (c) Jeremy Harris 1995 - 2018 */ |
| 6 | /* See the file NOTICE for conditions of use and distribution. */ |
| 7 | |
| 8 | /* FreeBSD-specific code. This is concatenated onto the generic |
| 9 | src/os.c file. */ |
| 10 | |
| 11 | |
| 12 | /************* |
| 13 | * Sendfile * |
| 14 | *************/ |
| 15 | |
| 16 | ssize_t |
| 17 | os_sendfile(int out, int in, off_t * off, size_t cnt) |
| 18 | { |
| 19 | off_t written; |
| 20 | return sendfile(in, out, *off, cnt, NULL, &written, 0) < 0 |
| 21 | ? (ssize_t) -1 : (ssize_t) written; |
| 22 | } |
| 23 | |
| 24 | /* End of os.c-Linux */ |