$NetBSD: patch-ak,v 1.3 2016/10/09 03:41:56 ryoon Exp $

--- lib/file/filePosix.c.orig	2016-02-16 20:06:45.000000000 +0000
+++ lib/file/filePosix.c
@@ -24,7 +24,7 @@
 
 #include <sys/types.h> /* Needed before sys/vfs.h with glibc 2.0 --hpreg */
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
 # include <sys/param.h>
 # include <sys/mount.h>
 #else
@@ -73,7 +73,7 @@
 
 #include "unicodeOperations.h"
 
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
 #if !defined(__APPLE__)
 static char *FilePosixLookupMountPoint(char const *canPath, Bool *bind);
 #endif
@@ -360,7 +360,7 @@ FileAttributes(const char *pathName,  //
  *----------------------------------------------------------------------
  */
 
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
 Bool
 File_IsRemote(const char *pathName)  // IN: Path name
 {
@@ -909,7 +909,7 @@ File_SetFilePermissions(const char *path
 }
 
 
-#if !defined(__FreeBSD__) && !defined(sun)
+#if !defined(__FreeBSD__) && !defined(sun) && !defined(__NetBSD__)
 /*
  *-----------------------------------------------------------------------------
  *
@@ -2006,7 +2006,7 @@ File_IsSameFile(const char *path1,  // I
 {
    struct stat st1;
    struct stat st2;
-#if !defined(sun)  // Solaris does not have statfs
+#if !defined(sun) && !defined(__NetBSD__) // Solaris does not have statfs
    struct statfs stfs1;
    struct statfs stfs2;
 #endif
@@ -2049,7 +2049,7 @@ File_IsSameFile(const char *path1,  // I
       return TRUE;
    }
 
-#if !defined(sun)  // Solaris does not have statfs
+#if !defined(sun) && !defined(__NetBSD__) // Solaris does not have statfs
    if (Posix_Statfs(path1, &stfs1) != 0) {
       return FALSE;
    }
