From: Ezra Peisach Date: Thu, 24 Feb 2000 14:19:25 +0000 (+0000) Subject: Test for for possible inet_ntop prototype X-Git-Tag: krb5-1.2-beta1~58 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0ec5613eb5d0720ff859542ccc561aeb14d31ba5;p=krb5.git Test for for possible inet_ntop prototype git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12065 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/clients/ChangeLog b/src/clients/ChangeLog index 1a5356fee..2ab67bdaa 100644 --- a/src/clients/ChangeLog +++ b/src/clients/ChangeLog @@ -1,3 +1,8 @@ +2000-02-24 Ezra Peisach + + * configure.in: Test for include file for inet_ntop + prototype. + 2000-02-07 Ken Raeburn * configure.in: Check for inet_ntop and getipnodebyaddr, both used diff --git a/src/clients/configure.in b/src/clients/configure.in index 6ab8d37d8..bd2046d2c 100644 --- a/src/clients/configure.in +++ b/src/clients/configure.in @@ -10,7 +10,7 @@ else SETENVOBJ= fi AC_SUBST(SETENVOBJ) -AC_CHECK_HEADERS(unistd.h pwd.h) +AC_CHECK_HEADERS(unistd.h pwd.h arpa/inet.h) case $krb5_cv_host in alpha-dec-osf*) AC_CHECK_LIB(security,setluid, diff --git a/src/clients/klist/ChangeLog b/src/clients/klist/ChangeLog index 2539ba0a4..8eb54d7be 100644 --- a/src/clients/klist/ChangeLog +++ b/src/clients/klist/ChangeLog @@ -1,3 +1,9 @@ +2000-02-24 Ezra Peisach + + * klist.c: Include if present for inet_ntop + prototype. Use const for the variable receiving the result of + inet_ntop. + 2000-02-16 Danilo Almeida * klist.c: Fix GET_PROGNAME macro to properly return program name diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c index d3f8ef2f3..c448d980f 100644 --- a/src/clients/klist/klist.c +++ b/src/clients/klist/klist.c @@ -36,6 +36,9 @@ #include #include #include +#if defined(HAVE_ARPA_INET_H) +#include +#endif #ifndef _WIN32 #define GET_PROGNAME(x) (strrchr((x), '/') ? strrchr((x), '/')+1 : (x)) @@ -110,7 +113,9 @@ void usage() * whether Kerberos 4 and Keberos 5 libraries are available */ +#ifdef KRB5_KRB4_COMPAT static int got_k4 = 0; +#endif static int got_k5 = 0; int @@ -652,7 +657,7 @@ void one_addr(a) if (no_resolve || !h) { #ifdef HAVE_INET_NTOP char buf[46]; - char *name = inet_ntop(a->addrtype, a->contents, buf, sizeof(buf)); + const char *name = inet_ntop(a->addrtype, a->contents, buf, sizeof(buf)); if (name) { printf ("%s", name); return;