--- src/sync.c.orig 2014-03-10 17:29:07.000000000 +0100 +++ src/sync.c 2014-03-10 17:31:44.000000000 +0100 @@ -35,7 +35,7 @@ #include #include -#ifndef _POSIX_SYNCHRONIZED_IO +#if !defined(_POSIX_SYNCHRONIZED_IO) || defined(__FreeBSD__) # define fdatasync fsync #endif --- src/drv_maildir.c.orig 2014-03-10 17:32:12.000000000 +0100 +++ src/drv_maildir.c 2014-03-10 17:32:24.000000000 +0100 @@ -43,7 +43,7 @@ # define LEGACY_FLOCK 1 #endif -#ifndef _POSIX_SYNCHRONIZED_IO +#if !defined(_POSIX_SYNCHRONIZED_IO) || defined(__FreeBSD__) # define fdatasync fsync #endif