$NetBSD$

--- cgi.c.orig	Fri Aug 20 17:14:07 1999
+++ cgi.c
@@ -31,7 +31,6 @@
 #include <unistd.h>
 #include <string.h>
 #include <ctype.h>
-#include <malloc.h>
 #include <cgi.h>
 
 int cgiDebugLevel = 0;
@@ -380,7 +379,7 @@ char **cgiGetVariables (s_cgi *parms)
 void cgiRedirect (const char *url)
 {
     if (url && strlen(url)) {
-	printf ("Content-type: text/html\nContent-length: %d\n", 77+(strlen(url)*2));
+	printf ("Content-type: text/html\nContent-length: %ld\n",(long)( 77+(strlen(url)*2)));
 	printf ("Status: 302 Temporal Relocation\n");
 	printf ("Location: %s\n\n", url);
 	printf ("<html>\n<body>\nThe page has been moved to <a href=\"%s\">%s</a>\n</body>\n</html>\n", url, url);
