From fe37b34023559ad4db38253d980ccaf431e83697 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 4 Aug 2017 10:06:12 +0300
Subject: Fix gcc2 build


diff --git a/doc/examples/responseheaders.c b/doc/examples/responseheaders.c
index aa5cd7e..4ea73e7 100644
--- a/doc/examples/responseheaders.c
+++ b/doc/examples/responseheaders.c
@@ -29,6 +29,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
   int fd;
   int ret;
   struct stat sbuf;
+  char errorstr;
 
   if (0 != strcmp (method, "GET"))
     return MHD_NO;
@@ -36,7 +37,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
   if ( (-1 == (fd = open (FILENAME, O_RDONLY))) ||
        (0 != fstat (fd, &sbuf)) )
     {
-      const char *errorstr =
+      errorstr =
         "<html><body>An internal server error has occured!\
                               </body></html>";
       /* error accessing file */
-- 
2.13.1


From cbc92847fcba8b6e1455bfba24dfa020618c9506 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Fri, 4 Aug 2017 10:06:42 +0300
Subject: Fix linker errors.


diff --git a/configure.ac b/configure.ac
index 0fd671a..d900d26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -326,6 +326,12 @@ netbsd*)
      mhd_host_os='OS/390'
      AC_MSG_RESULT([[$mhd_host_os]])
     ;;
+haiku*)
+     AC_DEFINE_UNQUOTED(HAIKU,1,[This is a Haiku system])
+     mhd_host_os='Haiku'
+     AC_MSG_RESULT([[$mhd_host_os]])
+     AC_SEARCH_LIBS(gethostbyname, network)
+     ;;
 *)
      mhd_host_os='unrecognised OS'
      AC_MSG_RESULT([[$mhd_host_os]])
-- 
2.13.1

