From 5a264f7820889439a8fb18acd05d2f930cc3fb3c Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 28 Mar 2002 02:13:19 +0000 Subject: [PATCH] * fake-addrinfo.h [NEED_FAKE_GETADDRINFO]: Include errno.h. (fake_getnameinfo) [__GNUC__ && __mips__]: Use const when referencing bytes of supplied address. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14296 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 6 ++++++ src/include/fake-addrinfo.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index e0c72d623..cd5741290 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,9 @@ +2002-03-27 Ken Raeburn + + * fake-addrinfo.h [NEED_FAKE_GETADDRINFO]: Include errno.h. + (fake_getnameinfo) [__GNUC__ && __mips__]: Use const when + referencing bytes of supplied address. + 2002-03-26 Ken Raeburn * fake-addrinfo.h: Incorporate all of fake-addrinfo.c. Make all diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h index 0b5fbf201..d1cfdd7b3 100644 --- a/src/include/fake-addrinfo.h +++ b/src/include/fake-addrinfo.h @@ -440,7 +440,7 @@ fake_getnameinfo (const struct sockaddr *sa, socklen_t len, using gcc 2.95; we get back "0.0.0.0". Since this in a configuration still important at Athena, here's the workaround.... */ - unsigned char *uc = (unsigned char *) &sinp->sin_addr; + const unsigned char *uc = (const unsigned char *) &sinp->sin_addr; char tmpbuf[20]; numeric_host: sprintf(tmpbuf, "%d.%d.%d.%d", uc[0], uc[1], uc[2], uc[3]); @@ -491,6 +491,8 @@ fake_getnameinfo (const struct sockaddr *sa, socklen_t len, return 0; } +#include + static inline char *gai_strerror (int code) { -- 2.26.2