mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
lib/replace: fix PTHREAD_MUTEX_ROBUST fallback to PTHREAD_MUTEX_ROBUST_NP on solaris 11
Without this we got the following defines in config.h: #define HAVE_DECL_PTHREAD_MUTEXATTR_SETROBUST_NP 1 #define HAVE_DECL_PTHREAD_MUTEX_CONSISTENT_NP 1 #define HAVE_PTHREAD_MUTEXATTR_SETROBUST 1 #define HAVE_PTHREAD_MUTEX_CONSISTENT 1 #define HAVE_ROBUST_MUTEXES 1 #define USE_TDB_MUTEX_LOCKING 1 And the build failed with PTHREAD_MUTEX_ROBUST being unknown. Note that PTHREAD_MUTEX_ROBUST and PTHREAD_MUTEX_ROBUST_NP are enum values while they're defines on solaris 11 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11319 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
ff072a6336
commit
34cf1d213e
@ -29,15 +29,12 @@
|
||||
|
||||
#if defined(HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP) && \
|
||||
!defined(HAVE_PTHREAD_MUTEXATTR_SETROBUST)
|
||||
|
||||
#define pthread_mutexattr_setrobust pthread_mutexattr_setrobust_np
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We assume that PTHREAD_MUTEX_ROBUST_NP goes along with
|
||||
* pthread_mutexattr_setrobust_np()
|
||||
*/
|
||||
#if defined(HAVE_DECL_PTHREAD_MUTEX_ROBUST_NP) && \
|
||||
!defined(HAVE_DECL_PTHREAD_MUTEX_ROBUST)
|
||||
#define PTHREAD_MUTEX_ROBUST PTHREAD_MUTEX_ROBUST_NP
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_PTHREAD_MUTEX_CONSISTENT_NP) && \
|
||||
|
@ -459,6 +459,10 @@ removeea setea
|
||||
conf.CHECK_FUNCS_IN('pthread_mutexattr_setrobust_np', 'pthread',
|
||||
checklibc=True, headers='pthread.h')
|
||||
|
||||
conf.CHECK_DECLS('PTHREAD_MUTEX_ROBUST', headers='pthread.h')
|
||||
if not conf.CONFIG_SET('HAVE_DECL_PTHREAD_MUTEX_ROBUST'):
|
||||
conf.CHECK_DECLS('PTHREAD_MUTEX_ROBUST_NP', headers='pthread.h')
|
||||
|
||||
conf.CHECK_DECLS('pthread_mutex_consistent', headers='pthread.h')
|
||||
if not conf.CONFIG_SET('HAVE_DECL_PTHREAD_MUTEX_CONSISTENT'):
|
||||
conf.CHECK_DECLS('pthread_mutex_consistent_np',
|
||||
@ -472,6 +476,8 @@ removeea setea
|
||||
|
||||
if ((conf.CONFIG_SET('HAVE_PTHREAD_MUTEXATTR_SETROBUST') or
|
||||
conf.CONFIG_SET('HAVE_PTHREAD_MUTEXATTR_SETROBUST_NP')) and
|
||||
(conf.CONFIG_SET('HAVE_DECL_PTHREAD_MUTEX_ROBUST') or
|
||||
conf.CONFIG_SET('HAVE_DECL_PTHREAD_MUTEX_ROBUST_NP')) and
|
||||
(conf.CONFIG_SET('HAVE_PTHREAD_MUTEX_CONSISTENT') or
|
||||
conf.CONFIG_SET('HAVE_PTHREAD_MUTEX_CONSISTENT_NP'))):
|
||||
conf.DEFINE('HAVE_ROBUST_MUTEXES', 1)
|
||||
|
Loading…
Reference in New Issue
Block a user