$OpenBSD: patch-configure,v 1.13 2014/12/28 15:17:10 robert Exp $
--- configure.orig	Sun Dec 28 16:00:38 2014
+++ configure	Sun Dec 28 16:02:11 2014
@@ -7309,6 +7309,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdio.h>
 #include <sys/socket.h>
 int
 main ()
@@ -11976,7 +11977,7 @@ echo "${ECHO_T}yes" >&6; }
 
 			 JABBER_INCDIR="$IKSEMEL_CPPFLAGS"
 			 JABBER_LIBDIR="$IKSEMEL_LDFLAGS"
-			 JABBER_LIBS="-liksemel"
+			 JABBER_LIBS="-liksemel -lpthread"
 
 fi
        else
@@ -11986,7 +11987,7 @@ echo $ECHO_N "checking for iksemel support... $ECHO_C"
                if test -f $_libiksemel_with/include/iksemel.h; then
                        JABBER_INCDIR="-I$_libiksemel_with/include"
                        JABBER_LIBDIR="-L$_libiksemel_with/lib"
-                       JABBER_LIBS="-liksemel"
+                       JABBER_LIBS="-liksemel -lpthread"
 		       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
                else
