1 /*************************************************
2 * Exim - an Internet mail transport agent *
3 *************************************************/
5 /* Copyright (c) Jeremy Harris 1995 - 2020 */
6 /* See the file NOTICE for conditions of use and distribution. */
8 /* FreeBSD-specific code. This is concatenated onto the generic
17 os_sendfile(int out, int in, off_t * offp, size_t cnt)
19 off_t loff = *offp, written;
21 if (sendfile(in, out, loff, cnt, NULL, &written, 0) < 0) return (ssize_t)-1;
22 *offp = loff + written;
23 return (ssize_t)written;
26 /*************************************************
27 TCP Fast Open: check that the ioctl is accepted
28 *************************************************/
30 #ifndef COMPILE_UTILITY
37 if ( (sock = socket(AF_INET, SOCK_STREAM, 0)) >= 0
38 && setsockopt(sock, IPPROTO_TCP, TCP_FASTOPEN, &on, sizeof(on) >= 0)
40 f.tcp_fastopen_ok = TRUE;
47 /* End of os.c-Linux */