48498b5692
- most of jolan's patches have been merged upstream. ok jolan@
30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
$OpenBSD: patch-src_lib_howl_socket_c,v 1.2 2005/07/25 19:22:14 aanriot Exp $
|
|
--- src/lib/howl/socket.c.orig Sun Jul 24 23:36:22 2005
|
|
+++ src/lib/howl/socket.c Sun Jul 24 23:43:56 2005
|
|
@@ -261,7 +261,7 @@ sw_multicast_socket_super_init(
|
|
err = sw_translate_error(self->m_desc != SW_INVALID_SOCKET, sw_socket_errno());
|
|
sw_check_okay_log(err, exit);
|
|
|
|
-#if defined(__APPLE__) || defined(__VXWORKS__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
|
+#if defined(__APPLE__) || defined(__VXWORKS__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
res = setsockopt(self->m_desc, SOL_SOCKET, SO_REUSEPORT, (char*) &opt, sizeof(opt));
|
|
#else
|
|
res = setsockopt(self->m_desc, SOL_SOCKET, SO_REUSEADDR, (char*) &opt, sizeof(opt));
|
|
@@ -375,6 +375,7 @@ sw_socket_join_multicast_group(
|
|
#endif
|
|
int res;
|
|
sw_result err;
|
|
+ sw_uchar mttl = (sw_uchar) ttl;
|
|
|
|
/*
|
|
initialize the group membership
|
|
@@ -425,7 +426,7 @@ sw_socket_join_multicast_group(
|
|
err = sw_translate_error(res == 0, sw_socket_errno());
|
|
sw_check_okay_log(err, exit);
|
|
|
|
- res = setsockopt(self->m_desc, IPPROTO_IP, IP_MULTICAST_TTL, (char*) &real_ttl, sizeof(real_ttl));
|
|
+ res = setsockopt(self->m_desc, IPPROTO_IP, IP_MULTICAST_TTL, (char*) &mttl, sizeof(mttl));
|
|
err = sw_translate_error(res == 0, sw_socket_errno());
|
|
sw_check_okay_log(err, exit);
|
|
|