#ifndef DISABLE_DKIM /* rest of file */
-#ifdef HAVE_LINUX_SENDFILE
-# include <sys/sendfile.h>
-#endif
-
static BOOL
dkt_sign_fail(struct ob_dkim * dkim, int * errp)
/*XXX should implement timeout, like transport_write_block_fd() ? */
-#ifdef HAVE_LINUX_SENDFILE
+#ifdef OS_SENDFILE
/* We can use sendfile() to shove the file contents
to the socket. However only if we don't use TLS,
as then there's another layer of indirection
ssize_t copied = 0;
while(copied >= 0 && off < size)
- copied = sendfile(out_fd, in_fd, &off, size - off);
+ copied = os_sendfile(out_fd, in_fd, &off, size - off);
if (copied < 0)
return FALSE;
}
{
#ifdef SUPPORT_TLS
wwritten = tls_out.active == out_fd
- ? tls_write(FALSE, p, sread)
+ ? tls_write(FALSE, p, sread, FALSE)
: write(out_fd, CS p, sread);
#else
wwritten = write(out_fd, CS p, sread);
goto CLEANUP;
}
-#ifndef HAVE_LINUX_SENDFILE
+#ifndef OS_SENDFILE
if (options & topt_use_bdat)
#endif
if ((k_file_size = lseek(dkim_fd, 0, SEEK_END)) < 0)