Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2012 03:08:34 -0700 (PDT)
From:      Unga <unga888@yahoo.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   localhost not recognised in getaddrinfo(3) in FreeBSD 9.0-STABLE
Message-ID:  <1335866914.5649.YahooMailNeo@web160106.mail.bf1.yahoo.com>

next in thread | raw e-mail | index | archive | help
Hi all=0A=0AFollowing code fragment works in FreeBSD 8.1-RELEASE, but not i=
n FreeBSD 9.0-STABLE:=0A=0Aerror =3D getaddrinfo("localhost", port, &hints,=
 &res0);=0A=A0if (error)=0A=A0=A0=A0 {=0A=A0=A0=A0=A0 fprintf(stderr,"getad=
drinfo failed - %s\n", gai_strerror(error));=0A=A0=A0=A0=A0 exit(1);=0A=A0=
=A0=A0 }=0A=0AIt complains: getaddrinfo failed - hostname nor servname prov=
ided, or not known=0A=0AAny idea why?=0A=0ABest regards=0AUnga=0A



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1335866914.5649.YahooMailNeo>