diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac index efe85f289f..3849690f7c 100644 --- a/testsuites/psxtests/configure.ac +++ b/testsuites/psxtests/configure.ac @@ -27,6 +27,9 @@ AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"]) RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API]) AM_CONDITIONAL(HAS_POSIX,test x"${rtems_cv_RTEMS_POSIX_API}" = x"yes") +# FIXME: newlib should supply declaration of pthread_rwlock_unlock() +AC_CHECK_DECLS([pthread_rwlock_unlock],[],[],[[#include ]]) + # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile psx01/Makefile diff --git a/testsuites/psxtests/psxrwlock01/test.c b/testsuites/psxtests/psxrwlock01/test.c index 11727c9e69..567d15d3da 100644 --- a/testsuites/psxtests/psxrwlock01/test.c +++ b/testsuites/psxtests/psxrwlock01/test.c @@ -19,6 +19,11 @@ /* #define __USE_XOPEN2K XXX already defined on GNU/Linux */ #include +#if !HAVE_DECL_PTHREAD_RWLOCK_UNLOCK +/* FIXME: Newlib should provide the decl. */ +extern int pthread_rwlock_unlock(pthread_rwlock_t *rwlock); +#endif + #define NUMBER_THREADS 2 pthread_t ThreadIds[NUMBER_THREADS]; pthread_rwlock_t RWLock;