Index: configure
--- configure.orig	2014-08-07 10:45:29.000000000 +0200
+++ configure	2014-08-20 22:45:24.111620989 +0200
@@ -14787,6 +14787,7 @@
 	saved_CPPFLAGS="$CPPFLAGS"
         savedcflags="$CFLAGS"
         savedldflags="$LDFLAGS"
+        savedlibs="$LIBS"
 	ICONV_CFLAGS=""
 	ICONV_LIBS=""
 
@@ -14810,7 +14811,8 @@
 
 
 	CFLAGS="$ICONV_CFLAGS $CFLAGS"
-        LDFLAGS="$LDFLAGS $ICONV_LIBS -liconv"
+        LDFLAGS="$LDFLAGS $ICONV_LIBS"
+        LIBS="$LIBS -liconv"
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv" >&5
 $as_echo_n "checking for libiconv... " >&6; }
@@ -14852,6 +14854,7 @@
         else
 	    CFLAGS="$savedcflags"
 	    LDFLAGS="$savedldflags"
+	    LIBS="$savedlibs"
 	    ICONV_LIBS=""
 	    ICONV_CFLAGS=""
 	    if test x"$withval" != x"no"; then
Index: etc/afpd/afp_dsi.c
--- etc/afpd/afp_dsi.c.orig	2014-08-20 22:45:24.140410000 +0200
+++ etc/afpd/afp_dsi.c	2014-08-21 00:24:40.789524015 +0200
@@ -437,6 +437,9 @@
 #endif /* DEBUGGING */
 
     /*  SIGCHLD */
+#if !defined(SIGCLD) && defined(SIGCHLD)
+#define SIGCLD SIGCHLD
+#endif
     action.sa_handler = child_handler;
 #ifdef SA_NOCLDWAIT
 /* this enhancement simplifies things for Solaris, it also improves performance */
