I had to make the following change to get the code to
compile on OpenBSD, where IPV6_ADD_MEMBERSHIP is not defined. 
According to Jun-ichiro itojun Hagino, from the Kame project
and *BSD's IPv6 guru, IPV6_{ADD,DROP}_MEMBERSHIP are obsoleted and
replaced by IPV6_{JOIN,LEAVE}_GROUP, that's why I change the values
used in the code. 

Any comments are welcome before I commit this (or a better version).

                                  Matthieu

Index: xc/programs/xdm/socket.c
===================================================================
RCS file: /home/x-cvs/xc/programs/xdm/socket.c,v
retrieving revision 3.11
diff -u -r3.11 socket.c
--- xc/programs/xdm/socket.c    9 Jul 2003 15:27:39 -0000       3.11
+++ xc/programs/xdm/socket.c    9 Jul 2003 20:53:58 -0000
@@ -379,6 +379,12 @@
            }
        }
 #if defined(IPv6) && defined(AF_INET6)
+#ifndef IPV6_JOIN_GROUP
+#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP 
+#endif
+#ifndef IPV6_LEAVE_GROUP
+#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
+#endif
        case AF_INET6:
        {
            struct ipv6_mreq mreq6;
@@ -387,9 +393,9 @@
              sizeof(struct in6_addr));
            mreq6.ipv6mr_interface = 0;  /* TODO: fix this */
            if (op == JOIN_MCAST_GROUP) {
-               sockopt = IPV6_ADD_MEMBERSHIP;
+               sockopt = IPV6_JOIN_GROUP;
            } else {
-               sockopt = IPV6_DROP_MEMBERSHIP;
+               sockopt = IPV6_LEAVE_GROUP;
            }
            if (setsockopt(s->fd, IPPROTO_IPV6, sockopt,
              &mreq6, sizeof(mreq6)) < 0) {

                                        Matthieu
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to