+#ifdef PREALLOCATE_NEEDS_TRUNCATE
+ /* Source file might have shrunk since we fstatted it.
+ * Cut off any extra preallocated zeros from dest file. */
-+ if (offset < preallocated_len && ftruncate(ofd, offset) < 0) {
++ if (offset < preallocated_len && do_ftruncate(ofd, offset) < 0) {
+ /* If we fail to truncate, the dest file may be wrong, so we
+ * must trigger the "partial transfer" error. */
+ rsyserr(FERROR_XFER, errno, "ftruncate %s", full_fname(dest));