summaryrefslogtreecommitdiff
path: root/mysys/my_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r--mysys/my_pthread.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index e1345b96627..38451f1f79a 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -426,9 +426,12 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
{
int error=pthread_cond_timedwait(cond, mutex, abstime);
if (error == -1) /* Safety if the lib is fixed */
- error=errno;
+ {
+ if (!(error=errno))
+ error= ETIMEDOUT; /* Can happen on HPUX */
+ }
if (error == EAGAIN) /* Correct errno to Posix */
- error=ETIMEDOUT;
+ error= ETIMEDOUT;
return error;
}
#endif