mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-10 14:23:34 -05:00
keep compatibility with slapd's gmtime_mutex (ITS#6262)
This commit is contained in:
parent
b3ef15321b
commit
4b4db7b529
2 changed files with 10 additions and 0 deletions
|
|
@ -68,12 +68,17 @@ extern int h_errno;
|
|||
|
||||
/* USE_GMTIME_R and USE_LOCALTIME_R defined in ldap_pvt.h */
|
||||
|
||||
#ifdef LDAP_DEVEL
|
||||
/* to be released with 2.5 */
|
||||
#if !defined( USE_GMTIME_R ) || !defined( USE_LOCALTIME_R )
|
||||
/* we use the same mutex for gmtime(3) and localtime(3)
|
||||
* because implementations may use the same buffer
|
||||
* for both functions */
|
||||
static ldap_pvt_thread_mutex_t ldap_int_gmtime_mutex;
|
||||
#endif
|
||||
#else /* ! LDAP_DEVEL */
|
||||
ldap_pvt_thread_mutex_t ldap_int_gmtime_mutex;
|
||||
#endif /* ! LDAP_DEVEL */
|
||||
|
||||
# if defined(HAVE_GETHOSTBYNAME_R) && \
|
||||
(GETHOSTBYNAME_R_NARGS < 5) || (6 < GETHOSTBYNAME_R_NARGS)
|
||||
|
|
|
|||
|
|
@ -1977,6 +1977,11 @@ LDAP_SLAPD_V (int) slap_tool_thread_max;
|
|||
|
||||
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) entry2str_mutex;
|
||||
|
||||
#ifndef LDAP_DEVEL
|
||||
/* to be removed with 2.5 */
|
||||
#define gmtime_mutex ldap_int_gmtime_mutex
|
||||
#endif /* ! LDAP_DEVEL */
|
||||
|
||||
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) ad_undef_mutex;
|
||||
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) oc_undef_mutex;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue