]> git.sur5r.net Git - openldap/commitdiff
Use MAXHOSTNAMELEN from <ac/socket.h> instead of HOST_NAME_MAX as the latter ain...
authorKurt Zeilenga <kurt@openldap.org>
Wed, 22 Aug 2007 18:05:18 +0000 (18:05 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 22 Aug 2007 18:05:18 +0000 (18:05 +0000)
clients/tools/common.c

index 7b4075d0d215679f0cada46f0e357aec87950f03..88fe29db48780fef935937a448f2f1565a194d0a 100644 (file)
@@ -1234,7 +1234,7 @@ tool_bind( LDAP *ld )
                LDAPControl c;
                char            *ip = NULL, *name = NULL;
                struct berval   id = { 0 }, prefix_id;
-               char            namebuf[ HOST_NAME_MAX ];
+               char            namebuf[ MAXHOSTNAMELEN ];
                char            *ptr;
 
                if ( gethostname( namebuf, sizeof( namebuf ) ) == 0 ) {
@@ -1676,7 +1676,7 @@ tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
                if ( stValue.bv_val == NULL ) {
                        char            *ip = NULL, *name = NULL;
                        struct berval   id = { 0 };
-                       char            namebuf[ HOST_NAME_MAX ];
+                       char            namebuf[ MAXHOSTNAMELEN ];
 
                        if ( gethostname( namebuf, sizeof( namebuf ) ) == 0 ) {
                                struct hostent  *h;