From owner-freebsd-questions@FreeBSD.ORG Thu Nov 13 10:16:50 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4202E16A4CF for ; Thu, 13 Nov 2003 10:16:50 -0800 (PST) Received: from obsecurity.dyndns.org (adsl-63-207-60-234.dsl.lsan03.pacbell.net [63.207.60.234]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7793144022 for ; Thu, 13 Nov 2003 10:16:49 -0800 (PST) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id E218666B60; Thu, 13 Nov 2003 10:16:48 -0800 (PST) Date: Thu, 13 Nov 2003 10:16:48 -0800 From: Kris Kennaway To: Cordula's Web Message-ID: <20031113181648.GA52950@xor.obsecurity.org> References: <200311131559.hADFxLfU004445@fw.farid-hajji.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: <200311131559.hADFxLfU004445@fw.farid-hajji.net> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org Subject: Re: No gethostbyname_r() in FreeBSD? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2003 18:16:50 -0000 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 13, 2003 at 04:59:21PM +0100, Cordula's Web wrote: > Hi, >=20 > I'm trying to compile milter-dnsrbl.c from > ftp://ftp.atnf.csiro.au/pub/people/rgooch/email-utilities/mailutils.tgz >=20 > The problem is that gethostbyname_r() doesn't seem to exist > in FreeBSD. This is the code which uses it (from milter-dnsrbl.c): >=20 > -------------------------------------------------------------------------= ----- > #if !defined(__linux__) || !defined(__GLIBC__) > if ( !gethostbyname_r (lookup_name, &ret, buf, sizeof buf, &herrn= um) ) > continue; > #else > if ( gethostbyname_r (lookup_name, &ret, buf, sizeof buf, &result, > &herrnum) ) continue; > #endif > -------------------------------------------------------------------------= ----- >=20 > Am I just missing something here (like linking to some obscure library), > or is that really a known issue? >=20 > I'm using: > FreeBSD 4.9-STABLE #0: Fri Nov 7 03:24:27 CET 2003 > with a GENERIC kernel. It's a known issue. There are some third party DNS libraries that provide an implementation, e.g. in newer versions of bind. Kris --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/s8qQWry0BWjoQKURAjMwAJ0ec20vIQRR2+ACok2qck3MX79RCgCfS/7X trnfYr4Gnor1pOrjs3aZZ9g= =ChyF -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7--