Merge pull request #866 from linquize/content-type-encoding
[mono.git] / mono / io-layer / messages.c
index 26a5d4292bddf2fe1dc7e87ba004f3f454cb67e8..1b052dbaca7762a9091872067680eabe8634faa0 100644 (file)
 #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>
 
 #undef DEBUG
 
 typedef struct {
        int id;
-       const char const *txt;
+       const char *txt;
 } ErrorDesc;
 
 static ErrorDesc common_messages [] = {
@@ -1830,7 +1831,7 @@ find_msg (guint32 id, ErrorDesc *base, int n)
        ErrorDesc d, *result;
        d.id = id;
        
-       result = bsearch (&d, base, n, sizeof (ErrorDesc), msg_compare);
+       result = mono_binary_search (&d, base, n, sizeof (ErrorDesc), msg_compare);
        if (result == NULL)
                return NULL;
        return result->txt;