The pthread.h on Android has no definition for pthread_rwlock_t, which
makes the associated intercepts in Helgrind and DRD un-compilable.
Add a configure test for it, and use them to guard the aforementioned
intercepts.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11875 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c
index 798ee6c..20b368c 100644
--- a/helgrind/hg_intercepts.c
+++ b/helgrind/hg_intercepts.c
@@ -1274,6 +1274,10 @@
/*--- pthread_rwlock_t functions ---*/
/*----------------------------------------------------------------*/
+/* Android's pthread.h doesn't say anything about rwlocks, hence these
+ functions have to be conditionally compiled. */
+#if defined(HAVE_PTHREAD_RWLOCK_T)
+
/* Handled: pthread_rwlock_init pthread_rwlock_destroy
pthread_rwlock_rdlock
pthread_rwlock_wrlock
@@ -1618,6 +1622,8 @@
# error "Unsupported OS"
#endif
+#endif /* defined(HAVE_PTHREAD_RWLOCK_T) */
+
/*----------------------------------------------------------------*/
/*--- POSIX semaphores ---*/