Fix usages of TEMP_FAILURE_RETRY(pthread_foo(...)).

pthread functions don't return -1 and set errno on failure, they return
a positive errno value instead.

Test: treehugger
Change-Id: I0097660e44c86c4c49d642e1169a30e43f9662bf
diff --git a/runtime/base/mutex.cc b/runtime/base/mutex.cc
index b2ddff3..c11e3d1 100644
--- a/runtime/base/mutex.cc
+++ b/runtime/base/mutex.cc
@@ -1028,7 +1028,11 @@
   guard_.recursion_count_ = 0;
   timespec ts;
   InitTimeSpec(true, clock, ms, ns, &ts);
-  int rc = TEMP_FAILURE_RETRY(pthread_cond_timedwait(&cond_, &guard_.mutex_, &ts));
+  int rc;
+  while ((rc = pthread_cond_timedwait(&cond_, &guard_.mutex_, &ts)) == EINTR) {
+    continue;
+  }
+
   if (rc == ETIMEDOUT) {
     timed_out = true;
   } else if (rc != 0) {