NetBSD and cmake

Thiago Macieira thiago at kde.org
Mon Mar 27 10:42:14 CEST 2006


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. 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.

-- 
Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
  thiago.macieira (AT) trolltech.com     Trolltech AS
    GPG: 0x6EF45358                   |  Sandakerveien 116,
    E067 918B B660 DBD1 105C          |  NO-0402
    966C 33F5 F005 6EF4 5358          |  Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060327/98f07bda/attachment-0001.pgp 


More information about the Kde-buildsystem mailing list