diff -up gnupg-1.4.11/configure.ac.orig gnupg-1.4.11/configure.ac
--- gnupg-1.4.11/configure.ac.orig	2010-02-17 15:06:58.390594560 -0700
+++ gnupg-1.4.11/configure.ac	2010-02-17 15:07:20.451936256 -0700
@@ -657,6 +657,8 @@ dnl be detected.
 
 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
 	[NETLIBS="-lnsl $NETLIBS"]))
+AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(network, gethostbyname,
+	[NETLIBS="-lnetwork $NETLIBS"]))
 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
 	[NETLIBS="-lsocket $NETLIBS"]))
 
diff -up gnupg-1.4.11/util/dotlock.c.orig gnupg-1.4.11/util/dotlock.c
--- gnupg-1.4.11/util/dotlock.c.orig	2010-02-17 15:07:04.697040896 -0700
+++ gnupg-1.4.11/util/dotlock.c	2010-02-17 15:07:12.601620480 -0700
@@ -432,7 +432,11 @@ make_dotlock( DOTLOCK h, long timeout )
     {
 #ifndef HAVE_DOSISH_SYSTEM
 # ifndef __riscos__
+#  ifdef __HAIKU__
+      if( !symlink(h->tname, h->lockname) )
+#  else
       if( !link(h->tname, h->lockname) )
+#  endif
         {
           /* fixme: better use stat to check the link count */
           h->locked = 1;
