mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
Portability fix for HPUX
mysys/my_pthread.c: Portability fix BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
parent
a17ad22af4
commit
92240b8ca3
2 changed files with 10 additions and 2 deletions
|
|
@ -416,8 +416,15 @@ 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 || error == -1) ? ETIMEDOUT : error;
|
||||
int error=pthread_cond_timedwait(cond, mutex, abstime);
|
||||
if (error == -1) /* Safety if the lib is fixed */
|
||||
{
|
||||
if (!(error=errno))
|
||||
error= ETIMEDOUT; /* Can happen on HPUX */
|
||||
}
|
||||
if (error == EAGAIN) /* Correct errno to Posix */
|
||||
error= ETIMEDOUT;
|
||||
return error;
|
||||
}
|
||||
#endif /* HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue