[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: problem with HAVE_GAI_STRERROR on RedHat5.2 (ITS#1073)



I note this is fixed in HEAD and OPENLDAP_REL_ENG_2.

At 07:30 PM 3/14/01 +0000, andrej@jpd.sk wrote:
>version: openldap-2.0.7
>
>hello,
>
>there is a bug in servers/slapd/daemon.c, it's unable to compile it
>without gai_strerror() function.
>
>i added some #ifdef there and it works fine now.
>
>check the lines around #243.
>
>also in include/portable.h at line 149 uncomment #undef HAVE_GAI_STRERROR
>
>regards,
>
>andrej
>
>-- 8< --
>bad code:
>  if (err = getaddrinfo(host, serv, &hints, &res)) {
>    Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed: %s\n",
>           gai_strerror(err), 0, 0);
>    return -1;
>  }
>
>good code:
>  if (err = getaddrinfo(host, serv, &hints, &res)) {
>#  ifdef HAVE_GAI_STRERROR
>    Debug( LDAP_DEBUG_ANY, "daemon: getaddrinfo failed: %s\n",
>           gai_strerror(err), 0, 0);
>#  endif
>    return -1;
>  }
>-- 8< --
>
>-- 
>Andrej Kvasnica, mailto:andrej@jpd.sk, ICQ:14843157
>tel/fax:+421-862-5421932, mobile:+421-905-260620
>JPD development Ltd., http://www.jpd.sk/, mailto:jpd@jpd.sk
>Vansovej 32, 97101 Prievidza, Slovak Republic, Europe
>Silicon Graphics Integrator, Informix Authorized VAR, Netscape Partner
>
>Our business is run on trust.  We trust you will pay in advance.