From fbce3984666a35acc22e99ee86f8cc267fef4b2f Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 26 Jul 2005 04:21:19 +0000 Subject: [PATCH] Also declare copy_hostent() if LDAP_R_COMPILE && HAVE_GETHOSTBYADDR_R. Only declare safe_realloc() if LDAP_R_COMPILE. Indentation cleanup. --- libraries/libldap/util-int.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c index cfd755f85e..089a17cafd 100644 --- a/libraries/libldap/util-int.c +++ b/libraries/libldap/util-int.c @@ -59,9 +59,9 @@ extern int h_errno; # include ldap_pvt_thread_mutex_t ldap_int_resolv_mutex; -#if (defined( HAVE_CTIME_R ) || defined( HAVE_REENTRANT_FUNCTIONS)) \ - && defined( CTIME_R_NARGS ) -# define USE_CTIME_R +# if (defined( HAVE_CTIME_R ) || defined( HAVE_REENTRANT_FUNCTIONS)) \ + && defined( CTIME_R_NARGS ) +# define USE_CTIME_R # else static ldap_pvt_thread_mutex_t ldap_int_ctime_mutex; # endif @@ -110,12 +110,14 @@ char *ldap_pvt_ctime( const time_t *tp, char *buf ) #define BUFSTART (1024-32) #define BUFMAX (32*1024-32) +#if defined(LDAP_R_COMPILE) static char *safe_realloc( char **buf, int len ); -#if !defined(HAVE_GETHOSTBYNAME_R) && defined(LDAP_R_COMPILE) +#if !(defined(HAVE_GETHOSTBYNAME_R) && defined(HAVE_GETHOSTBYADDR_R)) static int copy_hostent( struct hostent *res, char **buf, struct hostent * src ); #endif +#endif int ldap_pvt_gethostbyname_a( const char *name, -- 2.39.5