diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index c0f7f0466e..c675222549 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -78,7 +78,6 @@ #include #include -#include #include diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 763e28f484..e5436e753c 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -68,7 +68,6 @@ #include #include -#include #ifdef GSSAPI #include diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 8673a364e8..707ffe156e 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -803,7 +803,7 @@ echo "I:ensure unresolvable server name is fatal in non-interactive mode ($n)" $NSUPDATE < nsupdate.out 2>&1 && ret=1 server unresolvable.. END -grep "couldn't get address for 'unresolvable..': failure" nsupdate.out > /dev/null || ret=1 +grep "couldn't get address for 'unresolvable..': not found" nsupdate.out > /dev/null || ret=1 grep "syntax error" nsupdate.out > /dev/null || ret=1 [ $ret = 0 ] || { echo I:failed; status=1; } @@ -813,7 +813,7 @@ echo "I:ensure unresolvable server name is not fatal in interactive mode ($n)" $NSUPDATE -i < nsupdate.out 2>&1 || ret=1 server unresolvable.. END -grep "couldn't get address for 'unresolvable..': failure" nsupdate.out > /dev/null || ret=1 +grep "couldn't get address for 'unresolvable..': not found" nsupdate.out > /dev/null || ret=1 [ $ret = 0 ] || { echo I:failed; status=1; } n=`expr $n + 1` diff --git a/lib/irs/include/irs/netdb.h.in b/lib/irs/include/irs/netdb.h.in index 3661e7d72f..a0aba7fed8 100644 --- a/lib/irs/include/irs/netdb.h.in +++ b/lib/irs/include/irs/netdb.h.in @@ -149,6 +149,51 @@ struct addrinfo { #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 +/* + * Define to map into irs_ namespace. + */ + +#define IRS_NAMESPACE + +#ifdef IRS_NAMESPACE + +/* + * Use our versions not the ones from the C library. + */ + +#ifdef getnameinfo +#undef getnameinfo +#endif +#define getnameinfo irs_getnameinfo + +#ifdef getaddrinfo +#undef getaddrinfo +#endif +#define getaddrinfo irs_getaddrinfo + +#ifdef freeaddrinfo +#undef freeaddrinfo +#endif +#define freeaddrinfo irs_freeaddrinfo + +#ifdef gai_strerror +#undef gai_strerror +#endif +#define gai_strerror irs_gai_strerror + +#endif + +extern int getaddrinfo (const char *name, + const char *service, + const struct addrinfo *req, + struct addrinfo **pai); +extern int getnameinfo (const struct sockaddr *sa, + socklen_t salen, char *host, + socklen_t hostlen, char *serv, + socklen_t servlen, int flags); +extern void freeaddrinfo (struct addrinfo *ai); +extern const char *gai_strerror (int ecode); + /* * Tell Emacs to use C mode on this file. * Local variables: