$OpenBSD: patch-configure,v 1.13 2008/07/08 22:38:12 sthen Exp $
--- configure.orig	Wed Jun  4 06:16:09 2008
+++ configure	Thu Jun 12 17:30:58 2008
@@ -16139,11 +16139,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
@@ -17271,6 +17269,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;
@@ -17323,6 +17322,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;
