I really don’t know how solve this problem. 

I think the problem is that use of gethostbyname for IPv6 is obsolete. May be Carlos help us with this issue