about summary refs log tree commit diff
path: root/nptl/tst-mutex8.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/tst-mutex8.c')
-rw-r--r--nptl/tst-mutex8.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/nptl/tst-mutex8.c b/nptl/tst-mutex8.c
index d2307e47e7..c3d40faabe 100644
--- a/nptl/tst-mutex8.c
+++ b/nptl/tst-mutex8.c
@@ -93,10 +93,18 @@ tf (void *arg)
 static int
 check_type (const char *mas, pthread_mutexattr_t *ma)
 {
-  int e __attribute__((unused));
+  int e;
 
-  if (pthread_mutex_init (m, ma) != 0)
+  e = pthread_mutex_init (m, ma);
+  if (e != 0)
     {
+#ifdef ENABLE_PI
+      if (e == ENOTSUP)
+	{
+	  puts ("PI mutexes unsupported");
+	  return 0;
+	}
+#endif
       printf ("1st mutex_init failed for %s\n", mas);
       return 1;
     }