diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 963c4017b..909940773 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1426,7 +1426,7 @@ pthread_rwlock::rdlock (PLARGE_INTEGER timeout) if (reader->n < UINT32_MAX) ++reader->n; else - errno = EAGAIN; + result = EAGAIN; goto DONE; }