$OpenBSD: patch-configure,v 1.9 2013/01/24 18:48:15 robert Exp $
--- configure.orig	Wed Jan 23 19:03:56 2013
+++ configure	Wed Jan 23 19:04:53 2013
@@ -6011,6 +6011,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 ()
@@ -8730,7 +8731,7 @@ $as_echo "yes" >&6; }
 
 			 JABBER_INCDIR="$IKSEMEL_CPPFLAGS"
 			 JABBER_LIBDIR="$IKSEMEL_LDFLAGS"
-			 JABBER_LIBS="-liksemel"
+			 JABBER_LIBS="-liksemel -lpthread"
 
 fi
        else
@@ -8740,7 +8741,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
