Index: doc/Makefile.in
--- doc/Makefile.in.orig	2006-10-22 22:36:24 +0200
+++ doc/Makefile.in	2006-10-23 09:43:48 +0200
@@ -824,7 +824,7 @@
 	mv t-$@ $@
 
 $(DVIS): $(EXTRA_DIST)
-$(INFO_DEPS): $(EXTRA_DIST)
+###$(INFO_DEPS): $(EXTRA_DIST)
 
 # List words/regexps here that should not appear in the texinfo documentation.
 # E.g., use @sc{nul}, not `NUL'
Index: lib/mountlist.c
--- lib/mountlist.c.orig	2006-09-14 11:53:59 +0200
+++ lib/mountlist.c	2006-10-23 09:43:48 +0200
@@ -168,6 +168,11 @@
 
 #if MOUNTED_GETMNTINFO
 
+# if defined(__NetBSD__) && (__NetBSD_Version__ > 299000000)
+# define statfs				statvfs
+# define HAVE_F_FSTYPENAME_IN_STATFS	1
+# endif
+
 # if ! HAVE_STRUCT_STATFS_F_FSTYPENAME
 static char *
 fstype_to_string (short int t)
Index: src/nice.c
--- src/nice.c.orig	2006-10-22 18:54:15 +0200
+++ src/nice.c	2006-10-23 09:43:48 +0200
@@ -20,6 +20,7 @@
 #include <config.h>
 #include <stdio.h>
 #include <getopt.h>
+#include <sys/time.h>
 #include <sys/types.h>
 
 #include "system.h"
Index: src/stat.c
--- src/stat.c.orig	2006-10-22 18:54:15 +0200
+++ src/stat.c	2006-10-23 09:43:48 +0200
@@ -148,6 +148,12 @@
 #define hextobin(c) ((c) >= 'a' && (c) <= 'f' ? (c) - 'a' + 10 : \
 		     (c) >= 'A' && (c) <= 'F' ? (c) - 'A' + 10 : (c) - '0')
 
+#if (defined(__NetBSD__) && (__NetBSD_Version__ > 299000000))
+#include <sys/statvfs.h>
+#define	statfs					statvfs
+#define	STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME	f_fstypename
+#endif
+
 #define PROGRAM_NAME "stat"
 
 #define AUTHORS "Michael Meskes"
