]> git.pld-linux.org Git - packages/openldap.git/blob - openldap-gethostbyXXXX_r.patch
perl 5.38.0 rebuild
[packages/openldap.git] / openldap-gethostbyXXXX_r.patch
1 The non-reentrant gethostbyXXXX() functions deadlock if called recursively, for
2 example if libldap needs to be initialized from within gethostbyXXXX() (which
3 actually happens if nss_ldap is used for hostname resolution and earlier
4 modules can't resolve the local host name), so use the reentrant versions of
5 the functions, even if we're not being compiled for use in libldap_r (patch
6 from Jeffery Layton, #179730).
7 --- openldap-2.3.19/libraries/libldap/util-int.c        2006-02-23 15:42:14.000000000 -0500
8 +++ openldap-2.3.19/libraries/libldap/util-int.c        2006-02-23 15:42:02.000000000 -0500
9 @@ -52,8 +52,8 @@
10  #ifndef LDAP_R_COMPILE
11  # undef HAVE_REENTRANT_FUNCTIONS
12  # undef HAVE_CTIME_R
13 -# undef HAVE_GETHOSTBYNAME_R
14 -# undef HAVE_GETHOSTBYADDR_R
15 +/* # undef HAVE_GETHOSTBYNAME_R */
16 +/* # undef HAVE_GETHOSTBYADDR_R */
17  
18  #else
19  # include <ldap_pvt_thread.h>
20 @@ -110,7 +110,7 @@
21  #define BUFSTART (1024-32)
22  #define BUFMAX (32*1024-32)
23  
24 -#if defined(LDAP_R_COMPILE)
25 +#if defined(LDAP_R_COMPILE) || defined(HAVE_GETHOSTBYNAME_R) && defined(HAVE_GETHOSTBYADDR_R)
26  static char *safe_realloc( char **buf, int len );
27  
28  #if !(defined(HAVE_GETHOSTBYNAME_R) && defined(HAVE_GETHOSTBYADDR_R))
This page took 0.022287 seconds and 3 git commands to generate.