From d9b950dd26da3523dfb7462be427ba6bfe0fea05 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 25 Feb 2000 22:11:12 +0000 Subject: [PATCH] * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12074 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/ChangeLog | 9 +++++++++ src/kdc/configure.in | 2 +- src/kdc/network.c | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index ec22618cc..a49e84c9a 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,12 @@ +2000-02-25 Tom Yu + + * 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 Alec H. Peterson diff --git a/src/kdc/configure.in b/src/kdc/configure.in index 8b56a1c83..6bcd6c4d9 100644 --- a/src/kdc/configure.in +++ b/src/kdc/configure.in @@ -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 diff --git a/src/kdc/network.c b/src/kdc/network.c index 713ef02f1..e77a12110 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -40,6 +40,10 @@ #include #include #include +#ifdef HAVE_SYS_SOCKIO_H +/* for SIOCGIFCONF, etc. */ +#include +#endif #include #if HAVE_SYS_SELECT_H #include @@ -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; -- 2.26.2