]> git.sur5r.net Git - openldap/commitdiff
fix compiler warnings by including ac/unistd.h and only declaring copy_hostent()...
authorBen Collins <bcollins@openldap.org>
Fri, 15 Sep 2000 03:06:18 +0000 (03:06 +0000)
committerBen Collins <bcollins@openldap.org>
Fri, 15 Sep 2000 03:06:18 +0000 (03:06 +0000)
libraries/libldap/util-int.c

index 0cc70589d6bf6334085d86afed1fff952416b96a..ff002eb9f65d688ec7af555936ab30364cc95eb4 100644 (file)
@@ -29,6 +29,7 @@
 #include <ac/socket.h>
 #include <ac/string.h>
 #include <ac/time.h>
+#include <ac/unistd.h>
 
 #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,