$OpenBSD: patch-src_http_c,v 1.3 2015/06/19 09:07:32 ajacoutot Exp $

Unbreak build with libupnp>=1.6.17

--- src/http.c.orig	Sun Dec  9 14:03:36 2007
+++ src/http.c	Fri Nov  2 16:13:38 2012
@@ -25,6 +25,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <errno.h>
 
@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, const size_t le
   info->content_type = ixmlCloneDOMString (content_type);
 }
 
-static int
-http_get_info (const char *filename, struct File_Info *info)
+int http_get_info (const char *filename, struct File_Info *info)
 {
   extern struct ushare_t *ut;
   struct upnp_entry_t *entry = NULL;
@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, const char *des
   return ((UpnpWebFileHandle) file);
 }
 
-static UpnpWebFileHandle
-http_open (const char *filename, enum UpnpOpenFileMode mode)
+UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode)
 {
   extern struct ushare_t *ut;
   struct upnp_entry_t *entry = NULL;
@@ -251,8 +250,7 @@ http_open (const char *filename, enum UpnpOpenFileMode
   return ((UpnpWebFileHandle) file);
 }
 
-static int
-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
+int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
 {
   struct web_file_t *file = (struct web_file_t *) fh;
   ssize_t len = -1;
@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *buf, size_t buf
   return len;
 }
 
-static int
-http_write (UpnpWebFileHandle fh __attribute__((unused)),
+int http_write (UpnpWebFileHandle fh __attribute__((unused)),
             char *buf __attribute__((unused)),
             size_t buflen __attribute__((unused)))
 {
@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attribute__((unused
   return 0;
 }
 
-static int
-http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
+int http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
 {
   struct web_file_t *file = (struct web_file_t *) fh;
   off_t newpos = -1;
@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t offset, int ori
   return 0;
 }
 
-static int
-http_close (UpnpWebFileHandle fh)
+int http_close (UpnpWebFileHandle fh)
 {
   struct web_file_t *file = (struct web_file_t *) fh;
 
@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh)
 
   return 0;
 }
-
-struct UpnpVirtualDirCallbacks virtual_dir_callbacks =
-  {
-    http_get_info,
-    http_open,
-    http_read,
-    http_write,
-    http_seek,
-    http_close
-  };
