--- libraries/libmdb/mdb.c 2012-02-29 19:37:09.000000000 +0200 +++ libraries/libmdb/mdb.c 2012-03-13 23:44:12.000000000 +0200 @@ -157,6 +157,9 @@ #define UNLOCK_MUTEX_W(env) sem_post((env)->me_wmutex) #define fdatasync(fd) fsync(fd) #else +#ifdef __FreeBSD__ +#define fdatasync(fd) fsync(fd) +#endif #ifdef ANDROID #define fdatasync(fd) fsync(fd) #endif