X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fdkim_transport.c;h=95e750e5edd630edbb6292a9df444f6feebc648d;hb=7d758a6a6842fac6c511039c29d76300e2e21ccd;hp=882fc877296bb7b45eba57b431430f8a154ea0b8;hpb=40525d07a858c90293bc09188fb539a1cec3f8aa;p=exim.git diff --git a/src/src/dkim_transport.c b/src/src/dkim_transport.c index 882fc8772..95e750e5e 100644 --- a/src/src/dkim_transport.c +++ b/src/src/dkim_transport.c @@ -12,10 +12,6 @@ #ifndef DISABLE_DKIM /* rest of file */ -#ifdef HAVE_LINUX_SENDFILE -# include -#endif - static BOOL dkt_sign_fail(struct ob_dkim * dkim, int * errp) @@ -47,7 +43,7 @@ DEBUG(D_transport) debug_printf("send file fd=%d size=%u\n", out_fd, (unsigned)( /*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 @@ -57,7 +53,7 @@ if (tls_out.active != out_fd) 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; } @@ -255,7 +251,7 @@ else if (!(rc = dkt_sign_fail(dkim, &save_errno))) 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)