From 557cc55f6f398c0cd02571c077d5c73156820513 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Thu, 23 Aug 2007 14:30:24 +0000 Subject: Porting library to OS/400 --- lib/inet_ntop.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/inet_ntop.c') diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index a05689adb..1fdcb2ebe 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -69,7 +69,12 @@ static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size) return (char *)memmove(dst, ptr, strlen(ptr)+1); #elif defined(HAVE_INET_NTOA_R) + +#if defined(HAVE_INT_INET_NTOA_R) + return inet_ntoa_r(*(struct in_addr*)src, dst, size)? NULL: dst; +#else return inet_ntoa_r(*(struct in_addr*)src, dst, size); +#endif #else const char *addr = inet_ntoa(*(struct in_addr*)src); -- cgit v1.2.3