From 621babf51da2cc936e2e6659fab02e8a3ba8c873 Mon Sep 17 00:00:00 2001 From: Ben Collins Date: Fri, 15 Sep 2000 03:06:18 +0000 Subject: [PATCH] fix compiler warnings by including ac/unistd.h and only declaring copy_hostent() when we actually need to use it --- libraries/libldap/util-int.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c index 0cc70589d6..ff002eb9f6 100644 --- a/libraries/libldap/util-int.c +++ b/libraries/libldap/util-int.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "ldap-int.h" @@ -95,7 +96,11 @@ char *ldap_pvt_ctime( const time_t *tp, char *buf ) #define BUFMAX (32*1024) static char *safe_realloc( char **buf, int len ); + +#if !defined(HAVE_GETHOSTBYNAME_R) && defined(LDAP_R_COMPILE) +# define NEED_COPY_HOSTENT static int copy_hostent( struct hostent *res, char **buf, struct hostent * src ); +#endif int ldap_pvt_gethostbyname_a( const char *name, -- 2.39.5