Index: configure
--- configure.orig	2006-09-30 16:09:57 +0200
+++ configure	2006-11-12 11:20:13 +0100
@@ -23035,6 +23035,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/socket.h>
Index: tools/Makefile.in
--- tools/Makefile.in.orig	2007-11-01 18:45:14.000000000 +0100
+++ tools/Makefile.in	2008-03-28 18:04:57.000000000 +0100
@@ -395,7 +395,7 @@
 		${INSTALL} -m 600 stunnel.pem $(DESTDIR)$(confdir)/stunnel.pem; \
 		rm stunnel.pem; \
 	fi
-	${INSTALL} -d -m 1770 $(DESTDIR)$(localstatedir)/lib/stunnel
+	${INSTALL} -d -m 0770 $(DESTDIR)$(localstatedir)/lib/stunnel
 	-chgrp $(DEFAULT_GROUP) $(DESTDIR)$(localstatedir)/lib/stunnel
 	if uname | grep SunOS; then \
 		${INSTALL} -d -m 755 $(DESTDIR)$(localstatedir)/lib/stunnel/dev; \
