Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use getaddrinfo and parse /etc/hosts on linux #460
The motivation for this change is that my application needs /etc/hosts to be parsed and used.
You may be wondering why I then applied a commit "Change EventDriver.resolveHost parameter..." The answer is that I can't compile the current master HEAD (see #458). So I branched from the most recent commit that compiles for me, and made my changes. Then I cherry picked d49f615 and resolved conflicts.
So far I've only tested with an /etc/hosts containing localhost. Tomorrow I will test with a more challenging /etc/hosts file that maps nameFoo to 127.0.0.1 and nameBar to a remote IP. I have every reason to believe it will work.
Actually, rather than base_load_hosts, it's probably better to call