patches/uClibc/0.9.30.1/100-fix-gethostent_r-failure-retval.patch
changeset 1248 5402327d22fa
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/uClibc/0.9.30.1/100-fix-gethostent_r-failure-retval.patch	Sun Mar 08 17:11:31 2009 +0000
     1.3 @@ -0,0 +1,17 @@
     1.4 +Original patch from Gentoo.
     1.5 +
     1.6 +-= BEGIN original header =-
     1.7 +-= END original header =-
     1.8 +
     1.9 +diff -durN uClibc-0.9.30.orig/libc/inet/resolv.c uClibc-0.9.30/libc/inet/resolv.c
    1.10 +--- uClibc-0.9.30.orig/libc/inet/resolv.c	2008-11-02 01:25:33.000000000 +0100
    1.11 ++++ uClibc-0.9.30/libc/inet/resolv.c	2009-02-07 09:57:59.000000000 +0100
    1.12 +@@ -1788,7 +1788,7 @@
    1.13 + int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen,
    1.14 + 	struct hostent **result, int *h_errnop)
    1.15 + {
    1.16 +-	int ret;
    1.17 ++	int ret = HOST_NOT_FOUND;
    1.18 + 
    1.19 + 	__UCLIBC_MUTEX_LOCK(mylock);
    1.20 + 	if (__gethostent_fp == NULL) {