$NetBSD$

--- lib/http.c.orig	Wed Nov  9 19:13:03 2005
+++ lib/http.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <openssl/err.h>
+#include <netinet/in.h>
 #include <arpa/inet.h>
 
 /*
@@ -77,7 +78,8 @@
  * urlencode -- encode characters that should not appear in an URL
  */
 char	*urlencode(const char *string) {
-	char	*result, *p, *q;
+	const char *p;
+	char	*result, *q;
 	int	l;
 
 	/* allocate a suitable block of memory				*/
