Return an error if npth_rwlock_timedwrlock is not supported.
authorWerner Koch <wk@gnupg.org>
Thu, 10 May 2012 17:00:35 +0000 (19:00 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 10 May 2012 17:00:35 +0000 (19:00 +0200)
* src/npth.c (npth_rwlock_timedwrlock): Return ENOSYS if there is no
way to build it.

src/npth.c

index 788fcc0..c998732 100644 (file)
@@ -394,6 +394,8 @@ npth_rwlock_timedwrlock (npth_rwlock_t *rwlock, const struct timespec *abstime)
 #elif HAVE_PTHREAD_RWLOCK_TRYRDLOCK
   err = busy_wait_for ((trylock_func_t) pthread_rwlock_trywrlock, rwlock,
                       abstime);
+#else
+  err = ENOSYS;
 #endif
   LEAVE();
   return err;