diff --git a/configure.in b/configure.in index 5e6efe8ea5d35e7876e3b483e42a527e5a476fba..8f31e58e397e413010e1fd4bd2773f8fa2810275 100644 --- a/configure.in +++ b/configure.in @@ -853,6 +853,7 @@ case $SYSTEM_TYPE in echo "Using --with-named-thread=-lpthread" with_named_thread="-lcma" fi + AC_DEFINE(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) ;; *hpux11.*) echo "Enabling pread/pwrite workaround for hpux 11" diff --git a/include/my_pthread.h b/include/my_pthread.h index 30e9ea95e02f080cbbd45de8ddd8359a84143da0..4c90882e76b88283fea7277ba7bdb1942df28447 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -349,7 +349,7 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); #undef HAVE_GETHOSTBYADDR_R /* No definition */ #endif -#if defined(HAVE_DEC_THREADS) +#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) extern int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *abstime); diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 8c6b366e9b1efeb033dd30ab521b991f5d0522d5..72409b6aa86023aac37e3fc80019b6be73694bcf 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -412,7 +412,7 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr) /* Change functions on HP to work according to POSIX */ -#ifdef HAVE_DEC_THREADS +#ifdef HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT #undef pthread_cond_timedwait int my_pthread_cond_timedwait(pthread_cond_t *cond, @@ -422,7 +422,7 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, int error=pthread_cond_timedwait(cond,mutex,abstime); return error == EAGAIN ? ETIMEDOUT : error; } -#endif /* HAVE_DEC_THREADS */ +#endif /* HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT */ /* Emulate SOLARIS style calls, not because it's better, but just to make the