summaryrefslogtreecommitdiff
path: root/lib/inet_ntop.c
diff options
context:
space:
mode:
authorPatrick Monnerat <Patrick.Monnerat@datasphere.ch>2007-08-23 14:30:24 +0000
committerPatrick Monnerat <Patrick.Monnerat@datasphere.ch>2007-08-23 14:30:24 +0000
commit557cc55f6f398c0cd02571c077d5c73156820513 (patch)
treecf56aa36be857b932eb1d15805ccc29dcfaed1b3 /lib/inet_ntop.c
parent2d8dba388bf9089cd53e8046825a07f935e6611e (diff)
downloadcurl-557cc55f6f398c0cd02571c077d5c73156820513.tar.gz
Porting library to OS/400
Diffstat (limited to 'lib/inet_ntop.c')
-rw-r--r--lib/inet_ntop.c5
1 files changed, 5 insertions, 0 deletions
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);