C++ compatibility

diff --git a/skeletons/constraints.c b/skeletons/constraints.c
index 5f01cc7..a7dce95 100644
--- a/skeletons/constraints.c
+++ b/skeletons/constraints.c
@@ -35,7 +35,7 @@
 
 static int
 __fill_errbuf(const void *buffer, size_t size, void *app_key) {
-	struct __fill_errbuf_arg *arg = app_key;
+	struct __fill_errbuf_arg *arg = (struct __fill_errbuf_arg *)app_key;
 	size_t avail = arg->errlen - arg->erroff;
 
 	if(avail > size)
@@ -107,7 +107,7 @@
 	 * More space required to hold the message.
 	 */
 	len = ret + 1;
-	p = alloca(len);
+	p = (char *)alloca(len);
 	if(!p) return;	/* Can fail on !x86. */