diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-06-24 11:58:43 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-06-24 11:58:43 +0000 |
commit | e49a6feabbb28b360c6d7588375c439f18257c07 (patch) | |
tree | a7794169dc575ba9e41112f77a59adf14bf54681 /lib | |
parent | feb2dd283533f842c9b6e4cc2fcc7fd35638d5a0 (diff) |
fix for systems without gethostbyname_r()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hostip4.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c index cdc01a47c..284ed0b7c 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -355,13 +355,10 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, infof(data, "gethostbyname(2) failed for %s\n", hostname); else { /* - * Copy the hostent struct right here, as the static one we got a - * pointer to might get removed when we don't want/expect that. Windows - * (other platforms?) also doesn't allow passing of the returned data - * between threads, which thus the copying here them allows the app to - * do. + * Translate the hostent to Curl_addrinfo and return the allocated + * data. */ - return Curl_addrinfo_copy(h); + return Curl_addrinfo_copy(h, port); } #endif /*HAVE_GETHOSTBYNAME_R */ } |