Commit 8d75ff64 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi
Browse files

Portability fix for HPUX

parent a1e50625
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,3 +23,4 @@ serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi
zak@balfor.local
monty@narttu.
monty@mashka.mysql.fi
+9 −2
Original line number Diff line number Diff line
@@ -417,7 +417,14 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond,
			      struct timespec *abstime)
{
  int error=pthread_cond_timedwait(cond, mutex, abstime);
  return (error == EAGAIN || error == -1) ? ETIMEDOUT : error;
  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 */