From 8a97695b9e58e2f7a4d047df7514484dd8d33e4d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 8 Aug 2024 00:34:11 +0200 Subject: [PATCH] test-programs: Update rwlock-type/. --- test-programs/rwlock-type/test-pthread-rwlock-type.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-programs/rwlock-type/test-pthread-rwlock-type.c b/test-programs/rwlock-type/test-pthread-rwlock-type.c index 31ae957d..0ba330c8 100644 --- a/test-programs/rwlock-type/test-pthread-rwlock-type.c +++ b/test-programs/rwlock-type/test-pthread-rwlock-type.c @@ -57,7 +57,7 @@ get_effective_type (pthread_rwlock_t *lock) int main () { -#if __GLIBC__ >= 2 +#if __GLIBC__ >= 2 && defined __linux__ /* Find the effective type of a PREFER_READER lock. */ const char *type_p_reader; @@ -117,7 +117,7 @@ main () type_def = get_effective_type (&lock); } -#if __GLIBC__ >= 2 +#if __GLIBC__ >= 2 && defined __linux__ printf ("PREFER_READER -> type = %s\n", type_p_reader); printf ("PREFER_WRITER -> type = %s\n", type_p_writer); printf ("PREFER_WRITER_NONRECURSIVE -> type = %s\n", type_p_writer_nonrec); @@ -125,7 +125,7 @@ main () #endif printf ("Default -> type = %s\n", type_def); -#if __GLIBC__ >= 2 +#if __GLIBC__ >= 2 && defined __linux__ ASSERT (strcmp (type_default, type_def) == 0); #endif -- 2.39.5