From d61737a880391aecc97cc7f4ddcd3b9b920177a5 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 16 Oct 2024 12:46:26 +0200 Subject: [PATCH] pthread-h tests: Fix a compilation error on MacOS X 10.4. Reported by Sevan Janiyan in . * tests/test-pthread.c: Omit the PTHREAD_RWLOCK_INITIALIZER test if module 'pthread-rwlock' is not in use. --- ChangeLog | 8 ++++++++ tests/test-pthread.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 23565d144c..e1aec74b26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-10-16 Bruno Haible + + pthread-h tests: Fix a compilation error on MacOS X 10.4. + Reported by Sevan Janiyan in + . + * tests/test-pthread.c: Omit the PTHREAD_RWLOCK_INITIALIZER test if + module 'pthread-rwlock' is not in use. + 2024-10-10 Bruno Haible csharpcomp-script: Handle directories with spaces correctly. diff --git a/tests/test-pthread.c b/tests/test-pthread.c index f7e89c667c..a78e714e0d 100644 --- a/tests/test-pthread.c +++ b/tests/test-pthread.c @@ -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; -- 2.39.5