about summary refs log tree commit diff
path: root/nptl/tst-initializers1.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/tst-initializers1.c')
-rw-r--r--nptl/tst-initializers1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nptl/tst-initializers1.c b/nptl/tst-initializers1.c
index 9036e6eac3..d30e885e08 100644
--- a/nptl/tst-initializers1.c
+++ b/nptl/tst-initializers1.c
@@ -47,5 +47,12 @@ main (void)
   if (rwl_writer.__data.__flags
       != PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)
     return 6;
+  /* <bits/libc-lock.h> __libc_rwlock_init definition for libc.so
+     relies on PTHREAD_RWLOCK_INITIALIZER being all zeros.  If
+     that ever changes, <bits/libc-lock.h> needs updating.  */
+  size_t i;
+  for (i = 0; i < sizeof (rwl_normal); i++)
+    if (((char *) &rwl_normal)[i] != '\0')
+      return 7;
   return 0;
 }