I've just pushed on the review queue a similar propose patch to use getifaddrs() for Linux.