Loading lib/hostip.c +19 −8 Original line number Diff line number Diff line Loading @@ -597,14 +597,25 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data, #endif #ifdef HAVE_GETHOSTBYNAME_R_6 /* Linux */ while((res=gethostbyname_r(hostname, do { res=gethostbyname_r(hostname, (struct hostent *)buf, (char *)buf + sizeof(struct hostent), step_size - sizeof(struct hostent), &h, /* DIFFERENCE */ &h_errnop))==ERANGE) { &h_errnop); /* Redhat 8, using glibc 2.2.93 changed the behavior. Now all of a sudden this function seems to be setting EAGAIN if the given buffer size is too small. Previous versions are known to return ERANGE for the same. */ if((ERANGE == res) || (EAGAIN == res)) { step_size+=200; continue; } break; } while(1); if(!h) /* failure */ res=1; Loading Loading
lib/hostip.c +19 −8 Original line number Diff line number Diff line Loading @@ -597,14 +597,25 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data, #endif #ifdef HAVE_GETHOSTBYNAME_R_6 /* Linux */ while((res=gethostbyname_r(hostname, do { res=gethostbyname_r(hostname, (struct hostent *)buf, (char *)buf + sizeof(struct hostent), step_size - sizeof(struct hostent), &h, /* DIFFERENCE */ &h_errnop))==ERANGE) { &h_errnop); /* Redhat 8, using glibc 2.2.93 changed the behavior. Now all of a sudden this function seems to be setting EAGAIN if the given buffer size is too small. Previous versions are known to return ERANGE for the same. */ if((ERANGE == res) || (EAGAIN == res)) { step_size+=200; continue; } break; } while(1); if(!h) /* failure */ res=1; Loading