From: Bruno Haible Date: Wed, 16 Oct 2024 10:46:26 +0000 (+0200) Subject: pthread-h tests: Fix a compilation error on MacOS X 10.4. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=d61737a880391aecc97cc7f4ddcd3b9b920177a5;p=gnulib.git 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. --- 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;