Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help. getaddrinfo, getipnodebyname, gethostbyname_r all failing

6 views
Skip to first unread message

ScottM

unread,
Jul 29, 2009, 7:11:23 PM7/29/09
to
LynxOS 4.2.0. Tool is gcc 3.2.2 crosscompiled from Solaris, board is
powerPC.

getaddinfo() can translate a string like "127.0.0.1" to an ip address
without fail, but it returns error 4 (undefined internal screwup) on
any non-numeric name, including the name of the host I'm running on.
getipnodebyname() returns NULL. getostbyname_r() returns NULL. But I
can open up /etc/hosts and parse it, find the name, and return the ip
address correctly myself, just fine.

Code like this runs without effort on other systems.

ping (which presumably doesn't directly open up /etc/hosts) can
resolve host names, so the system's clearly capable of doing
resolution. Just not in my code.

I'm providing: -L/usr/local/lynx/4.2.0/ppc/./lib/thread /usr/local/
lynx/4.2.0/ppc/usr/local/lib/liblwres.a
Given that things link, I assume I'm getting the intended functions,
but maybe that's optimistic.

Am I doing anything obviously stupid? Any help appreciated.

0 new messages