From 4b4db7b5298973a9b3b4a28e76ad65122554c805 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 8 Sep 2009 23:21:21 +0000 Subject: [PATCH] keep compatibility with slapd's gmtime_mutex (ITS#6262) --- libraries/libldap/util-int.c | 5 +++++ servers/slapd/proto-slap.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c index d19f2b8069..4525966503 100644 --- a/libraries/libldap/util-int.c +++ b/libraries/libldap/util-int.c @@ -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) diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 5f5bc14a6b..e97e23f8f5 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -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; -- 2.39.5