--- vl.c.orig	2007-05-02 01:56:26.000000000 +0200
+++ vl.c	2007-05-02 01:57:42.000000000 +0200
@@ -44,7 +44,7 @@
 #include <netdb.h>
 #ifdef _BSD
 #include <sys/stat.h>
-#ifndef __APPLE__
+#ifndef _BSD
 #include <libutil.h>
 #endif
 #else
@@ -1801,6 +1801,9 @@
 
 static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
 {
+#ifdef __NetBSD__
+    return ENOTSUP;
+#endif
     int fd = (int)chr->opaque;
     uint8_t b;
 
@@ -1838,6 +1841,9 @@
 
 static CharDriverState *qemu_chr_open_pp(const char *filename)
 {
+#ifdef __NetBSD__
+    return ENOTSUP;
+#endif
     CharDriverState *chr;
     int fd;
 
