I've got working code to fix hostnameToAddress() on linux (bug #5909) but I'm not sure where to plug it in.

Tracing through the code, it seems the lowest common denominator would be to hook MCSocketHostNameResolve(), but I'm reluctant to mess with socket issues down at that level because unexpected side-effects.
The high-level approach would be to hook it into MCNetworkEvalHostNameToAddress() instead, replacing *all* the existing code in that function if the platform is linux, but that would mean not being able to leverage any existing lower-level code.

The socket code is pretty messy.
My code, while under 100 lines, is completely standalone and makes no use of any other engine code, so it doesn't seem like making the socket code even messier is the best way to attack the problem. So I'm looking for suggestions as to what direction to move in.

I've also found that there are various #defines sprinkled through the code, and I'm wondering if we can maybe condense these down to just one for sanity:

LINUX
_LINUX
TARGET_PLATFORM_LINUX
PLATFORM_LINUX

we also have
_LINUX_DESKTOP
_LINUX_SERVER
PLATFORM_LINUXMOBILE

That last one, while possibly interesting, also seems to be unused, as is PLATFORM_WINMOBILE.

...PLATFORM_LINUXMOBILE
That last one, while possibly interesting, also seems to be unused, as is PLATFORM_WINMOBILE.

I wish I had an answer for you but that last one made me remember there were more than a few attempts to move straight up linux to mobile, probably the best known attempt was made by Ubuntu. Fun times that