tsocks_gethostbyname_r does not assign result
From the manual, gethostbyname_r result argument must be assigned,
"After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL."
attached patchfile
Trac:
Username: cHBWyJuH