$NetBSD: patch-ae,v 1.1.1.1 2004/11/17 02:31:35 xtraeme Exp $

--- Source/plugin-threads.cpp.orig	2004-11-17 02:33:15.000000000 +0100
+++ Source/plugin-threads.cpp	2004-11-17 02:34:59.000000000 +0100
@@ -1,3 +1,4 @@
+#include <string.h>
 #include "plugin.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -6,6 +7,7 @@
 #include <fcntl.h>
 #include <signal.h>
 #include <sys/wait.h>
+#include <sys/param.h>
 
 extern int DEBUG;
 
@@ -202,7 +204,9 @@
 	// make the operations on the control pipe non-blocking
 	flags = fcntl(*control, F_GETFL, 0);
 	flags |= O_NONBLOCK;
+#ifndef BSD
 	flags |= O_NDELAY;
+#endif
 	fcntl(*control, F_SETFL, flags);
 
 	return fdopen(filedesr[0], "r");
