mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
hostbuf should be static
This commit is contained in:
parent
f22250baaa
commit
0f5a264dc3
@ -439,7 +439,7 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
|
|||||||
#if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) \
|
#if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) \
|
||||||
|| defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
|
|| defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
|
||||||
{
|
{
|
||||||
char hostbuf[MAXHOSTNAMELEN+1];
|
static char hostbuf[MAXHOSTNAMELEN+1];
|
||||||
if( gethostname( hostbuf, MAXHOSTNAMELEN ) == 0 ) {
|
if( gethostname( hostbuf, MAXHOSTNAMELEN ) == 0 ) {
|
||||||
hostbuf[MAXHOSTNAMELEN] = '\0';
|
hostbuf[MAXHOSTNAMELEN] = '\0';
|
||||||
ldap_int_hostname = hostbuf;
|
ldap_int_hostname = hostbuf;
|
||||||
|
Loading…
Reference in New Issue
Block a user