From: Kurt Zeilenga Date: Sun, 21 Dec 2003 08:25:55 +0000 (+0000) Subject: Revert #if 0 X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~119 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4590651cf90a63ac5390f5d9d4c7601423623c41;p=openldap Revert #if 0 --- diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 09fa94e01e..c3687a4397 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -585,10 +585,15 @@ ldap_host_connected_to( Sockbuf *sb, const char *host ) break; } -#if 0 { char *herr; +#ifdef NI_MAXHOST char hbuf[NI_MAXHOST]; +#elif defined( MAXHOSTNAMELEN + char hbuf[MAXHOSTNAMELEN]; +#else + char hbuf[256]; +#endif hbuf[0] = 0; if (ldap_pvt_get_hname( sa, len, hbuf, sizeof(hbuf), &herr ) == 0 @@ -597,7 +602,6 @@ ldap_host_connected_to( Sockbuf *sb, const char *host ) return LDAP_STRDUP( hbuf ); } } -#endif return host ? LDAP_STRDUP( host ) : NULL; }