]> Savannah Git Hosting - gnulib.git/commitdiff
pthread-h tests: Fix a compilation error on MacOS X 10.4.
authorBruno Haible <bruno@clisp.org>
Wed, 16 Oct 2024 10:46:26 +0000 (12:46 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 16 Oct 2024 12:08:03 +0000 (14:08 +0200)
Reported by Sevan Janiyan <venture37@geeklan.co.uk> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00183.html>.

* tests/test-pthread.c: Omit the PTHREAD_RWLOCK_INITIALIZER test if
module 'pthread-rwlock' is not in use.

ChangeLog
tests/test-pthread.c

index 010a5993ea8126fb99ea89e63ebddc5d1ea50da4..22964511df4c6abdbade4ab949da185627c2fa78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-16  Bruno Haible  <bruno@clisp.org>
+
+       pthread-h tests: Fix a compilation error on MacOS X 10.4.
+       Reported by Sevan Janiyan <venture37@geeklan.co.uk> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00183.html>.
+       * tests/test-pthread.c: Omit the PTHREAD_RWLOCK_INITIALIZER test if
+       module 'pthread-rwlock' is not in use.
+
 2024-10-10  Bruno Haible  <bruno@clisp.org>
 
        csharpcomp-script: Handle directories with spaces correctly.
index f7e89c667c2639a4bf1b078ecf72a7a514967570..a78e714e0dd74e00a8a4e8fa8bfd4bce7312d7a2 100644 (file)
@@ -30,8 +30,10 @@ pthread_once_t t3 = PTHREAD_ONCE_INIT;
 pthread_mutex_t t4 = PTHREAD_MUTEX_INITIALIZER;
 pthread_mutexattr_t t5;
 
+#if GNULIB_TEST_PTHREAD_RWLOCK
 pthread_rwlock_t t6 = PTHREAD_RWLOCK_INITIALIZER;
 pthread_rwlockattr_t t7;
+#endif
 
 pthread_cond_t t8 = PTHREAD_COND_INITIALIZER;
 pthread_condattr_t t9;