$OpenBSD: patch-configure,v 1.6 2007/02/28 20:31:08 mbalmer Exp $
--- configure.orig	Wed Feb 14 08:34:54 2007
+++ configure	Wed Feb 14 08:39:18 2007
@@ -21659,11 +21659,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char bzReadOpen ();
+char BZ2_bzReadOpen ();
 int
 main ()
 {
-return bzReadOpen ();
+return BZ2_bzReadOpen ();
   ;
   return 0;
 }
@@ -22220,6 +22220,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <sys/types.h>
 #include <netinet/in.h>
 
 #include <resolv.h>
@@ -23140,11 +23141,9 @@ _ACEOF
     ;;
 openbsd*)
     if test "$have_pthreads" = "yes"; then
-	if test "$use_cr" = "no"; then
-	    THREAD_LIBS="-pthread"
-	else
-	    THREAD_LIBS="-pthread -lc_r"
-	fi
+	ADDITIONAL_LIBS="-pthread"
+	CLAMD_LIBS="$CLAMD_LIBS -pthread"
+	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
 	TH_SAFE="-thread-safe"
 
 cat >>confdefs.h <<\_ACEOF
@@ -24218,6 +24217,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+#include <sys/types.h>
 #include <tcpd.h>
 int allow_severity = 0;
 int deny_severity  = 0;
@@ -24270,6 +24270,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+#include <sys/types.h>
 #include <tcpd.h>
 int allow_severity = 0;
 int deny_severity  = 0;
