Index: ulfius-2.5.2/src/ulfius.c
===================================================================
--- ulfius-2.5.2.orig/src/ulfius.c
+++ ulfius-2.5.2/src/ulfius.c
@@ -29,6 +29,12 @@
 #include "u_private.h"
 #include "ulfius.h"
 
+#if MHD_VERSION >= 0x00097001
+typedef enum MHD_Result u_MHD_Result;
+#else
+typedef int u_MHD_Result;
+#endif
+
 /** Define mock yder functions when yder is disabled **/
 #ifdef U_DISABLE_YDER
 int y_init_logs(const char * app, const unsigned long init_mode, const unsigned long init_level, const char * init_log_file, const char * message) {
@@ -60,7 +66,7 @@ int y_close_logs() {
 /**
  * Fill a map with the key/values specified
  */
-static int ulfius_fill_map_check_utf8(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) {
+static u_MHD_Result ulfius_fill_map_check_utf8(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) {
   char * tmp;
   int res;
   UNUSED(kind);
@@ -93,7 +99,7 @@ static int ulfius_fill_map_check_utf8(vo
 /**
  * Fill a map with the key/values specified
  */
-static int ulfius_fill_map(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) {
+static u_MHD_Result ulfius_fill_map(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) {
   char * tmp;
   int res;
   UNUSED(kind);
@@ -284,7 +290,7 @@ static void mhd_request_completed (void
  * if a parameter is larger than max_post_param_size, truncate it
  * return MHD_NO on error
  */
-static int mhd_iterate_post_data (void * coninfo_cls, enum MHD_ValueKind kind, const char * key,
+static u_MHD_Result mhd_iterate_post_data (void * coninfo_cls, enum MHD_ValueKind kind, const char * key,
                                   const char * filename, const char * content_type,
                                   const char * transfer_encoding, const char * data, uint64_t off, size_t size) {
   
@@ -340,7 +346,7 @@ static int mhd_iterate_post_data (void *
  * function executed by libmicrohttpd every time an HTTP call is made
  * return MHD_NO on error
  */
-static int ulfius_webservice_dispatcher (void * cls, struct MHD_Connection * connection,
+static u_MHD_Result ulfius_webservice_dispatcher (void * cls, struct MHD_Connection * connection,
                                          const char * url, const char * method,
                                          const char * version, const char * upload_data,
                                          size_t * upload_data_size, void ** con_cls) {
