No gethostbyname_r() in FreeBSD?

Kris Kennaway kris at obsecurity.org
Thu Nov 13 10:16:50 PST 2003


On Thu, Nov 13, 2003 at 04:59:21PM +0100, Cordula's Web wrote:
> Hi,
> 
> I'm trying to compile milter-dnsrbl.c from
>   ftp://ftp.atnf.csiro.au/pub/people/rgooch/email-utilities/mailutils.tgz
> 
> The problem is that gethostbyname_r() doesn't seem to exist
> in FreeBSD. This is the code which uses it (from milter-dnsrbl.c):
> 
> ------------------------------------------------------------------------------
> #if !defined(__linux__) || !defined(__GLIBC__)
>         if ( !gethostbyname_r (lookup_name, &ret, buf, sizeof buf, &herrnum) )
>             continue;
> #else
>         if ( gethostbyname_r (lookup_name, &ret, buf, sizeof buf, &result,
>                               &herrnum) ) continue;
> #endif
> ------------------------------------------------------------------------------
> 
> Am I just missing something here (like linking to some obscure library),
> or is that really a known issue?
> 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20031113/950220d5/attachment.bin


More information about the freebsd-questions mailing list