NetBSD and cmake

Hasso Tepper hasso at kde.org
Mon Mar 27 17:09:09 CEST 2006


Thiago Macieira wrote:
> Hasso Tepper wrote:
> >getservbyname_r, getprotobyname_r and getservbyport_r symbols exist in
> >NetBSD libc for binary compatibility, but no declaration in headers,
> > so they can't be used for compiling. AFAICS only symbol in library is
> > checked at the moment (check_function_exists), but it isn't enough.
>
> I remember this issue from before. Unfortunately, NetBSD insists on not
> providing a suitable declaration for simple, thread-safe functions.

getservbyname, getprotobyname and getservbyport are all already threadsafe 
in NetBSD AFAICS. See 
http://cvsweb.de.netbsd.org/cgi-bin/cvsweb.cgi/src/lib/libc/net/getservbyname.c?rev=1.13
for example.

> That means they are asking us to use the non-thread-safe versions if
> getaddrinfo(3) isn't enough.
>
> In any event, kresolver_p.h checks for the definition as well:
> /* some systems have the functions, but don't declare them */
> #if defined(HAVE_GETSERVBYNAME_R) && !HAVE_DECL_GETSERVBYNAME_R
> extern "C" {
>   struct servent;
> [...]
>
> Maybe the cmake test is testing only for the symbol presence, but not
> its declaration? We need both in this case.

Yes, that's the case at the moment. I'll provide patch shortly.


-- 
Hasso Tepper
KDE Estonian Team


More information about the Kde-buildsystem mailing list