problem with gethostbyname/1
Tue Oct 14 09:24:06 CEST 2003
Raimo Niskanen wrote:
> I have never come across a Gentoo Linux box before. Could you dump the
> following files as well as the output from os:type() and send to me?
we have done a fix to inet_config.erl for our Gentoo users.
It seems like Gentoo does not have the /etc/host.conf file so
we added usage of /etc/nsswitch.conf as well for 'linux' while
configuring the inet_db.
The diff below is against the R9C-0 version of inet_config.erl:
RCS file: /home/share/erlang/cvsroot/otp/lib/kernel/src/inet_config.erl,v
retrieving revision 220.127.116.11
retrieving revision 1.7
diff -u -r18.104.22.168 -r1.7
--- lib/kernel/src/inet_config.erl 2 Sep 2003 13:34:18 -0000 22.214.171.124
+++ lib/kernel/src/inet_config.erl 3 Sep 2003 13:53:57 -0000 1.7
@@ -82,8 +82,13 @@
+ case load_resolv(filename:join(Etc,"host.conf"),host_conf_li
+ ok ->
+ _Other ->
+ load_resolv(filename:join(Etc,"nsswitch.conf"), nssw
% It may be the case that the domain name was not set
% because the hostname was short. But we can now look it
% up and get the long name and the domain name from it.
Magnus Fröberg Tel: +46 (0)8 545 55 026
Alteon WebSystems AB Email: magnus@REDACTED
S:t Eriksgatan 44
SE-112 34 Stockholm, SWEDEN
More information about the erlang-questions