fix-gethostinfo-v2 from debian bug 675913

I'm not the author of this patch !

The relevant thread is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675913
The patch comes from http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=49;filename=675913_tpu_final.diff;att=1;bug=675913

As stated in the diff "patch by Zang MingJie, edited by Ruben Laban"