$OpenBSD: patch-net_socket_c,v 1.1 2011/01/26 13:51:43 sthen Exp $
--- net/socket.c.orig	Sat Oct 16 05:56:09 2010
+++ net/socket.c	Tue Jan 25 05:57:04 2011
@@ -154,6 +154,7 @@ static int net_socket_mcast_create(struct sockaddr_in 
     struct ip_mreq imr;
     int fd;
     int val, ret;
+    u_char loop;
     if (!IN_MULTICAST(ntohl(mcastaddr->sin_addr.s_addr))) {
 	fprintf(stderr, "qemu: error: specified mcastaddr \"%s\" (0x%08x) does not contain a multicast address\n",
 		inet_ntoa(mcastaddr->sin_addr),
@@ -193,9 +194,9 @@ static int net_socket_mcast_create(struct sockaddr_in 
     }
 
     /* Force mcast msgs to loopback (eg. several QEMUs in same host */
-    val = 1;
+    loop = 1;
     ret=setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP,
-                   (const char *)&val, sizeof(val));
+                   (const char *)&loop, sizeof(loop));
     if (ret < 0) {
 	perror("setsockopt(SOL_IP, IP_MULTICAST_LOOP)");
 	goto fail;
