kdc does not compile with glibc 2.8
authorEzra Peisach <epeisach@mit.edu>
Sun, 6 Jul 2008 02:30:17 +0000 (02:30 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 6 Jul 2008 02:30:17 +0000 (02:30 +0000)
On Fedora 9, glibc 2.8 is used.  The kdc code conditionalizes
IPV6_PKTINFO and HAVE_STRUCT_IN6_PKTINFO in a number of places = but
misses two for the struct one.

/usr/include/netinet/in.h conditionalizes struct in6_pktinfo on
__USE_GNU - which I believe implies a gnu libc extension.  People on
the net have defined GNU_SOURCE for various things to compile, etc.

I do note that /usr/include/linux/ipv6.h exists with the same definition.

I believe that ipv6 support in the kdc will not work with these changes - but
the tree compiles.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20498 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/network.c

index 1072fce3d021bf78a9c9a5b95434009e1ed71225..9db82d08d3550fcbb1ceb43945c0429f11c77aad 100644 (file)
@@ -921,7 +921,7 @@ recv_from_to(int s, void *buf, size_t len, int flags,
                return r;
            }
 #endif
-#if defined(KRB5_USE_INET6) && defined(IPV6_PKTINFO)
+#if defined(KRB5_USE_INET6) && defined(IPV6_PKTINFO)&& defined(HAVE_STRUCT_IN6_PKTINFO)
            if (cmsgptr->cmsg_level == IPPROTO_IPV6
                && cmsgptr->cmsg_type == IPV6_PKTINFO
                && *tolen >= sizeof(struct sockaddr_in6)) {
@@ -995,7 +995,7 @@ send_to_from(int s, void *buf, size_t len, int flags,
        msg.msg_controllen = CMSG_SPACE(sizeof(struct in_pktinfo));
        break;
 #endif
-#if defined(KRB5_USE_INET6) && defined(IPV6_PKTINFO)
+#if defined(KRB5_USE_INET6) && defined(IPV6_PKTINFO) && defined(HAVE_STRUCT_IN6_PKTINFO)
     case AF_INET6:
        if (fromlen != sizeof(struct sockaddr_in6))
            goto use_sendto;