$NetBSD$

--- misc.c.orig	2007-07-31 18:08:55.000000000 -0400
+++ misc.c
@@ -26,7 +26,13 @@ implied warranty of MERCHANTABILITY or F
 #include <sys/types.h>
 #include <assert.h>
 #include <errno.h>
+#if defined(HAVE_NBCOMPAT_H)
+#include <nbcompat/config.h>
+#include <nbcompat/cdefs.h>
+#include <nbcompat/stdio.h>
+#else
 #include <stdio.h>
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
