From: Daniel Stenberg Date: Thu, 17 Aug 2000 21:08:09 +0000 (+0000) Subject: Fred Noz fixed the gethostbyaddr_() call X-Git-Tag: curl-7_1_1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e35b4387cc38d4722285c3b5c0393c37622c815;p=thirdparty%2Fcurl.git Fred Noz fixed the gethostbyaddr_() call --- diff --git a/lib/ftp.c b/lib/ftp.c index c6584572fb..eb277f5cd0 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -777,13 +777,12 @@ CURLcode _ftp(struct connectdata *conn) extern int gethostbyaddr_r(char *addr, size_t len, int type, struct hostent *htent, struct hostent_data *ht_data); */ - /* Daniel: this implementation is really just guessing, please - verify this before trusting this. I don't have access to any - such system to try out! */ + /* Fred Noz helped me try this out, now it at least compiles! */ + if(gethostbyaddr_r((char *) &address, sizeof(address), AF_INET, (struct hostent *)hostent_buf, - hostent_buf + sizeof(*answer)) + hostent_buf + sizeof(*answer))) answer=NULL; # endif