It appears that Java's network machinery does lots of probing of network
addresses with ioctl(2), and /some/ of these ioctls don't work well with
Unix-domain sockets. If we see one of these, then make a temporary
Internet socket and do the ioctl on that instead.
This really is quite unpleasant, but it seems to work well enough to
make Gradle work, for example.