$OpenBSD: patch-configure,v 1.9 2007/08/02 18:12:55 aanriot Exp $
--- configure.orig	Thu May 31 00:09:14 2007
+++ configure	Sun Jul 29 14:32:16 2007
@@ -21664,11 +21664,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;
 }
@@ -23178,11 +23178,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
@@ -24304,6 +24302,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;
@@ -24356,6 +24355,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;
