mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Use MAXHOSTNAMELEN from <ac/socket.h> instead of HOST_NAME_MAX as the latter ain't available here.
This commit is contained in:
parent
7c9f63a60d
commit
a9b4c04f1c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user