$NetBSD: patch-aa,v 1.3 2010/02/02 10:45:17 jmmv Exp $ --- unionfs.c.orig 2007-02-09 16:17:37.000000000 +0000 +++ unionfs.c @@ -10,6 +10,7 @@ This is offered under a BSD-style licens #endif #include +#include #include #include #include @@ -192,7 +193,7 @@ static int unionfs_fsync(const char *pat int res; if (isdatasync) { -#ifdef _POSIX_SYNCHRONIZED_IO +#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO != -1 res = fdatasync(fi->fh); #else res = fsync(fi->fh);