From 38cd10852cbaec3a4129c5de73bd08e3c1aa0ef3 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 22 Jul 2004 22:03:52 +0000 Subject: [PATCH] [needs the include/configure.in checkin of a few minutes ago, too] * localaddr.c (get_lifconf): Define only if "struct lifconf" is available. (foreach_localaddr): Use get_lifconf only if "struct lifconf" is available. ticket: 2598 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16621 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 7 +++++++ src/lib/krb5/os/localaddr.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 760c6601f..7873efbd4 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,10 @@ +2004-07-22 Ken Raeburn + + * localaddr.c (get_lifconf): Define only if "struct lifconf" is + available. + (foreach_localaddr): Use get_lifconf only if "struct lifconf" is + available. + 2004-07-16 Ken Raeburn * genaddrs.c, localaddr.c, lock_file.c, mk_faddr.c: Don't check diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c index c5b89dcdf..774929c26 100644 --- a/src/lib/krb5/os/localaddr.c +++ b/src/lib/krb5/os/localaddr.c @@ -280,7 +280,13 @@ get_ifconf (int s, size_t *lenp, /*@out@*/ char *buf) return ret; } -#ifdef SIOCGLIFCONF /* Solaris */ +/* Solaris uses SIOCGLIFCONF to return struct lifconf which is just + an extended version of struct ifconf. + + HP-UX 11 also appears to have SIOCGLIFCONF, but uses struct + if_laddrconf, and struct if_laddrreq to be used with + SIOCGLIFADDR. */ +#if defined(SIOCGLIFCONF) && defined(HAVE_STRUCT_LIFCONF) static int get_lifconf (int af, int s, size_t *lenp, /*@out@*/ char *buf) /*@modifies *buf,*lenp@*/ @@ -454,7 +460,7 @@ foreach_localaddr (/*@null@*/ void *data, return 0; } -#elif defined (SIOCGLIFNUM) /* Solaris 8 and later; Sol 7? */ +#elif defined (SIOCGLIFNUM) && defined(HAVE_STRUCT_LIFCONF) /* Solaris 8 and later; Sol 7? */ int foreach_localaddr (/*@null@*/ void *data, -- 2.26.2