diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-04-17 12:34:36 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-04-17 12:34:36 +0000 |
commit | 8c8fbab31d989ee42b7781d0720291d6443d70d3 (patch) | |
tree | 3e8499a955ee8182622b43c87e3a6a6041258f9d /libc/inet | |
parent | 83a5601c6c746c3a296dfe3b017770c0942d60b4 (diff) |
Patch from Mike McDonald to make gethostbyname_r() not fail for things like
gethostbyname("192.168.0.1"), which should work even when the /etc/hosts and
/etc/config/hosts files do not exist.
Diffstat (limited to 'libc/inet')
-rw-r--r-- | libc/inet/resolv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index ae99ea068..fa7ba37fe 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1578,6 +1578,11 @@ int gethostbyname_r(const char * name, case HOST_NOT_FOUND: case NO_ADDRESS: break; + case NETDB_INTERNAL: + if (errno == ENOENT) { + break; + } + /* else fall through */ default: return i; } |