$OpenBSD: patch-configure,v 1.11 2014/07/08 08:10:38 robert Exp $
--- configure.orig	Mon Jun 23 16:13:05 2014
+++ configure	Tue Jul  8 10:09:58 2014
@@ -6253,6 +6253,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$
 $as_echo_n "checking for field ss_family in struct sockaddr_storage... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdio.h>
 #include <sys/socket.h>
 int
 main ()
@@ -9002,7 +9003,7 @@ $as_echo "yes" >&6; }
 
 			 JABBER_INCDIR="$IKSEMEL_CPPFLAGS"
 			 JABBER_LIBDIR="$IKSEMEL_LDFLAGS"
-			 JABBER_LIBS="-liksemel"
+			 JABBER_LIBS="-liksemel -lpthread"
 
 fi
        else
@@ -9012,7 +9013,7 @@ $as_echo_n "checking for iksemel support... " >&6; }
                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"
 		       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
                else
