diff --git a/libexec/mail.local/Makefile b/libexec/mail.local/Makefile index ea539a67d348..10371e436017 100644 --- a/libexec/mail.local/Makefile +++ b/libexec/mail.local/Makefile @@ -2,7 +2,9 @@ PROG= mail.local MAN8= mail.local.8 -# CFLAGS+= -DEXTRA_SAFETY +.if defined(DONT_FSYNC) +CFLAGS+= -DDONT_FSYNC +.endif BINOWN= root BINMODE=4555 INSTALLFLAGS=-fschg diff --git a/libexec/mail.local/mail.local.c b/libexec/mail.local/mail.local.c index d7b43a607f34..0d80972814dc 100644 --- a/libexec/mail.local/mail.local.c +++ b/libexec/mail.local/mail.local.c @@ -298,7 +298,7 @@ err1: (void)close(mbfd); return; } -#ifdef EXTRA_SAFETY +#ifndef DONT_FSYNC /* Flush to disk, don't wait for update. */ if (fsync(mbfd)) { e_to_sys(errno);