Merge pull request #2274 from esdrubal/udpclientreceive
[mono.git] / mono / metadata / attach.c
index 8f978326b4448af58d78b831d7a3b687477b33ca..4f5024a72f0bb61a91d78f648b0265e9500b47de 100644 (file)
@@ -152,7 +152,7 @@ decode_string_value (guint8 *buf, guint8 **endbuf, guint8 *limit)
 
        g_assert (length < (1 << 16));
 
-       s = g_malloc (length + 1);
+       s = (char *)g_malloc (length + 1);
 
        g_assert (p + length <= limit);
        memcpy (s, p, length);
@@ -524,7 +524,7 @@ receiver_thread (void *arg)
                        content_len = decode_int (p, &p, p_end);
 
                        /* Read message body */
-                       body = g_malloc (content_len);
+                       body = (guint8 *)g_malloc (content_len);
                        res = read (conn_fd, body, content_len);
                        
                        p = body;