* configure.in: Check for sys/sockio.h
authorTom Yu <tlyu@mit.edu>
Fri, 25 Feb 2000 22:11:12 +0000 (22:11 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 25 Feb 2000 22:11:12 +0000 (22:11 +0000)
* network.c: Conditionally include sys/sockio.h for SIOC* if
necessary.
(process_packet): Bracket AF_INET6 branch of a switch statement
with an ifdef.

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

src/kdc/ChangeLog
src/kdc/configure.in
src/kdc/network.c

index ec22618ccd9da9957511ca4e61d6415fa0e5b45d..a49e84c9ac96c01e20b68cab14edb1b74f39c2a3 100644 (file)
@@ -1,3 +1,12 @@
+2000-02-25  Tom Yu  <tlyu@mit.edu>
+
+       * configure.in: Check for sys/sockio.h
+
+       * network.c: Conditionally include sys/sockio.h for SIOC* if
+       necessary.
+       (process_packet): Bracket AF_INET6 branch of a switch statement
+       with an ifdef.
+
 2000-02-25  Ken Raeburn  <raeburn@mit.edu>
            Alec H. Peterson  <ahp@hilander.com>
 
index 8b56a1c83a7dee21588416d3cf7e0050680f39af..6bcd6c4d96f9f6b41e83786548ea3e1e9a6e14a2 100644 (file)
@@ -2,7 +2,7 @@ AC_INIT(main.c)
 CONFIG_RULES
 AC_PROG_INSTALL
 AC_HEADER_CHECK(termios.h,AC_FUNC_CHECK([tcsetattr],AC_DEFINE(POSIX_TERMIOS)))
-AC_CHECK_HEADERS(syslog.h stdarg.h sys/select.h)
+AC_CHECK_HEADERS(syslog.h stdarg.h sys/select.h sys/sockio.h)
 AC_CHECK_FUNCS(openlog syslog closelog strftime vsprintf)
 AC_PROG_AWK
 KRB5_AC_INET6
index 713ef02f175991992d4085f0556dbb2ac358111e..e77a12110e74bb71a5499cbb4e6330bd132ac7e2 100644 (file)
 #include <sys/types.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
+#ifdef HAVE_SYS_SOCKIO_H
+/* for SIOCGIFCONF, etc. */
+#include <sys/sockio.h>
+#endif
 #include <sys/time.h>
 #if HAVE_SYS_SELECT_H
 #include <sys/select.h>
@@ -406,11 +410,13 @@ void process_packet(port_fd, prog, portnum)
        addr.length = 4;
        addr.contents = (krb5_octet *) &((struct sockaddr_in *)&saddr)->sin_addr;
        break;
+#ifdef KRB5_USE_INET6
     case AF_INET6:
        addr.addrtype = ADDRTYPE_INET6;
        addr.length = 16;
        addr.contents = (krb5_octet *) &((struct sockaddr_in6 *)&saddr)->sin6_addr;
        break;
+#endif
     default:
        addr.addrtype = -1;
        addr.length = 0;