[io-layer] Allocate WapiHandle specific data on the heap
[mono.git] / mono / io-layer / messages.c
index a8a7db80ffd6a6b48ce453e11608be748949ee78..9c5bd31e06a5307d2e910290ea58cdf3a8f5f296 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/misc-private.h>
 #include <mono/io-layer/messages.h>
 #include <mono/utils/bsearch.h>
 
@@ -23,7 +22,7 @@
 
 typedef struct {
        int id;
-       const char const *txt;
+       const char *txt;
 } ErrorDesc;
 
 static ErrorDesc common_messages [] = {
@@ -1831,7 +1830,7 @@ find_msg (guint32 id, ErrorDesc *base, int n)
        ErrorDesc d, *result;
        d.id = id;
        
-       result = mono_binary_search (&d, base, n, sizeof (ErrorDesc), msg_compare);
+       result = (ErrorDesc *)mono_binary_search (&d, base, n, sizeof (ErrorDesc), msg_compare);
        if (result == NULL)
                return NULL;
        return result->txt;