summaryrefslogtreecommitdiff
path: root/mysys/thr_rwlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/thr_rwlock.c')
-rw-r--r--mysys/thr_rwlock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysys/thr_rwlock.c b/mysys/thr_rwlock.c
index 37630956e7f..dfa9065ff3a 100644
--- a/mysys/thr_rwlock.c
+++ b/mysys/thr_rwlock.c
@@ -65,8 +65,13 @@ int my_rwlock_init( rw_lock_t *rwp, void *arg __attribute__((unused)))
pthread_mutex_init( &rwp->lock, NULL );
pthread_condattr_init( &cond_attr );
+#ifdef HAVE_PTHREAD_CONDATTR_CREATE /* HPUX 11.0 */
+ pthread_cond_init( &rwp->readers, cond_attr );
+ pthread_cond_init( &rwp->writers, cond_attr );
+#else
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
+#endif
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;