$NetBSD: patch-aa,v 1.14 2011/01/24 18:54:04 drochner Exp $ --- modules/access/file.c.orig 2010-07-19 01:21:06.000000000 +0900 +++ modules/access/file.c 2011-01-04 22:05:25.000000000 +0900 @@ -52,6 +52,9 @@ #ifdef HAVE_LINUX_MAGIC_H # include # include +#elif defined (HAVE_FSTATVFS) +# include +# include #endif #if defined( WIN32 ) @@ -90,7 +93,12 @@ #ifndef WIN32 static bool IsRemote (int fd) { -#if defined (HAVE_FSTATVFS) && defined (MNT_LOCAL) +#if !defined(__linux__) && defined(HAVE_FSTATVFS) && defined (MNT_LOCAL) + struct statvfs s; + if (fstatvfs(fd, &s)) + return false; + return !(s.f_flag & MNT_LOCAL); +#elif defined (HAVE_FSTATFS) struct statvfs stf; if (fstatvfs (fd, &stf))