Index: configure
--- configure.orig	2016-05-12 21:42:35.000000000 +0200
+++ configure	2016-06-24 18:22:55.764016486 +0200
@@ -3664,6 +3664,7 @@
 ac_exeext=$EXEEXT
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdlib.h>
 #include <stdio.h>
 int
 main ()
Index: tools/Makefile.in
--- tools/Makefile.in.orig	2016-05-12 21:42:34.000000000 +0200
+++ tools/Makefile.in	2016-06-24 18:22:55.764016486 +0200
@@ -531,7 +531,7 @@
 
 
 install-data-local:
-	${INSTALL} -d -m 1770 $(DESTDIR)$(localstatedir)/lib/stunnel
+	${INSTALL} -d -m 0770 $(DESTDIR)$(localstatedir)/lib/stunnel
 	-chgrp $(DEFAULT_GROUP) $(DESTDIR)$(localstatedir)/lib/stunnel
 
 cert:
