summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-04-25 01:16:42 +0300
committermonty@hundin.mysql.fi <>2002-04-25 01:16:42 +0300
commit727122aadd80f9e1a127bcc1562c8dc95d786e4a (patch)
tree539e3f41736108728458d901c552313e5f058e8f /mysys
parent1f5f3612f30d67029fe9cc2ff5d5e44daa5698f2 (diff)
parentecf2c4e15a677a9f33ba8e7d6b2eb6a9da6538e4 (diff)
downloadmariadb-git-727122aadd80f9e1a127bcc1562c8dc95d786e4a.tar.gz
merge
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_pthread.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 37c18a32451..3a448864b21 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -410,9 +410,23 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr)
#endif
+/* Change functions on HP to work according to POSIX */
+
+#ifdef HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT
+#undef pthread_cond_timedwait
+
+int my_pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ struct timespec *abstime)
+{
+ int error=pthread_cond_timedwait(cond,mutex,abstime);
+ return error == EAGAIN ? ETIMEDOUT : error;
+}
+#endif /* HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT */
+
/*
-** Emulate SOLARIS style calls, not because it's better, but just to make the
-** usage of getbostbyname_r simpler.
+ Emulate SOLARIS style calls, not because it's better, but just to make the
+ usage of getbostbyname_r simpler.
*/
#if !defined(my_gethostbyname_r) && defined(HAVE_GETHOSTBYNAME_R)