summaryrefslogtreecommitdiffstats
path: root/sysdep
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-01-06 23:20:43 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-01-06 23:20:43 +0100
commit861f223a531be17d2e3e7abc0246be3057b809a0 (patch)
tree5f5139ccee69b0adc94005d26fce15c2351e1910 /sysdep
parent0c75411bec2f4e37bfdb4c7162631a22898052c1 (diff)
downloadbird-861f223a531be17d2e3e7abc0246be3057b809a0.tar
bird-861f223a531be17d2e3e7abc0246be3057b809a0.zip
BSD compatibility fix.
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/io.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 74612ac..39f29c5 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -492,10 +492,6 @@ tm_format_reltime(char *x, bird_clock_t t)
#define SOL_IPV6 IPPROTO_IPV6
#endif
-#ifndef IPV6_ADD_MEMBERSHIP
-#define IPV6_ADD_MEMBERSHIP IP_ADD_MEMBERSHIP
-#endif
-
static list sock_list;
static struct birdsock *current_sock;
static struct birdsock *stored_sock;
@@ -842,10 +838,9 @@ sk_join_group(sock *s, ip_addr maddr)
mreq.ipv6mr_interface = s->iface->index;
#endif
- /* RFC 2553 says IPV6_JOIN_GROUP */
- if (setsockopt(s->fd, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) < 0)
+ if (setsockopt(s->fd, SOL_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq)) < 0)
{
- log(L_ERR "sk_join_group: IPV6_ADD_MEMBERSHIP: %m");
+ log(L_ERR "sk_join_group: IPV6_JOIN_GROUP: %m");
return -1;
}
@@ -865,10 +860,9 @@ sk_leave_group(sock *s, ip_addr maddr)
mreq.ipv6mr_interface = s->iface->index;
#endif
- /* RFC 2553 says IPV6_LEAVE_GROUP */
- if (setsockopt(s->fd, SOL_IPV6, IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq)) < 0)
+ if (setsockopt(s->fd, SOL_IPV6, IPV6_LEAVE_GROUP, &mreq, sizeof(mreq)) < 0)
{
- log(L_ERR "sk_leave_group: IPV6_DROP_MEMBERSHIP: %m");
+ log(L_ERR "sk_leave_group: IPV6_LEAVE_GROUP: %m");
return -1;
}