*** libspread-util/src/data_link.c.orig 2016-11-22 21:07:12.000000000 +0100 --- libspread-util/src/data_link.c 2016-12-13 09:32:34.707739959 +0100 *************** *** 167 **** ! * TODO: check on sizeof setsockopt types across platforms (i.e. - Sun: char vs. int) --- 167 ---- ! * DONE: check on sizeof setsockopt types across platforms (i.e. - Sun: char vs. int) *************** *** 174 **** --- 175,176 ---- + int on =1, off =0; + unsigned char one=1, zero=0; *************** *** 176 **** ! Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: creating a SOCK_DGRAM socket of family %d\n", family); --- 178 ---- ! Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: 5.0.0-rc1-p1 creating a SOCK_DGRAM socket of family %d\n", family); *************** *** 200 **** ! if (setsockopt(chan, SOL_SOCKET, SO_BROADCAST, (tmp = 1, &tmp), sizeof(tmp))) --- 202 ---- ! if (setsockopt(chan, SOL_SOCKET, SO_BROADCAST, (char *)&on, sizeof(on))) *************** *** 205 **** ! if (setsockopt(chan, IPPROTO_IP, IP_MULTICAST_TTL, (tmp = 1, &tmp), sizeof(tmp))) --- 207 ---- ! if (setsockopt(chan, IPPROTO_IP, IP_MULTICAST_TTL, (void *)&one, sizeof(one))) *************** *** 213 **** ! if (setsockopt(chan, IPPROTO_IP, IP_MULTICAST_LOOP, (tmp = 0, &tmp), sizeof(tmp))) --- 215 ---- ! if (setsockopt(chan, IPPROTO_IP, IP_MULTICAST_LOOP, (void *)&zero, sizeof(zero))) *************** *** 221 **** ! if (setsockopt(chan, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (tmp = 1, &tmp), sizeof(tmp))) --- 223 ---- ! if (setsockopt(chan, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (void *)&one, sizeof(one))) *************** *** 229 **** ! if (setsockopt(chan, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, (tmp = 0, &tmp), sizeof(tmp))) --- 231 ---- ! if (setsockopt(chan, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, (void *)&zero, sizeof(zero))) *************** *** 243 **** ! if (setsockopt(chan, SOL_SOCKET, SO_BROADCAST, (tmp = 1, &tmp), sizeof(tmp))) --- 245 ---- ! if (setsockopt(chan, SOL_SOCKET, SO_BROADCAST, (char *)&on, sizeof(on))) *************** *** 254 **** ! if (setsockopt(chan, SOL_SOCKET, SO_REUSEADDR, (tmp = 1, &tmp), sizeof(tmp))) --- 256 ---- ! if (setsockopt(chan, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)))