From: Florian Weimer Date: Mon, 12 Feb 2024 11:18:34 +0000 (+0100) Subject: pthread_mutex_timedlock, pthread-spin: Fix configure test. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=69076cf4e147045c47613997a828e0f3a98f40c3;p=gnulib.git pthread_mutex_timedlock, pthread-spin: Fix configure test. * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Pass a pointer of the correct type to pthread_mutex_timedlock. * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Pass a pointer of the correct type to pthread_spin_init. Copyright-paperwork-exempt: Yes --- diff --git a/ChangeLog b/ChangeLog index e057e5d739..29fa0f8c80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-02-12 Florian Weimer + + pthread_mutex_timedlock, pthread-spin: Fix configure test. + * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Pass + a pointer of the correct type to pthread_mutex_timedlock. + * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Pass a pointer of the correct + type to pthread_spin_init. + 2024-02-09 Bruno Haible Avoid suboptimal definition of _GL_HAS_ATTRIBUTE on FreeBSD/sparc64. diff --git a/m4/pthread-spin.m4 b/m4/pthread-spin.m4 index 71c73bfb34..3365027780 100644 --- a/m4/pthread-spin.m4 +++ b/m4/pthread-spin.m4 @@ -1,4 +1,4 @@ -# pthread-spin.m4 serial 4 +# pthread-spin.m4 serial 4.1 dnl Copyright (C) 2019-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -42,7 +42,7 @@ AC_DEFUN([gl_PTHREAD_SPIN], [AC_LANG_PROGRAM( [[#include ]], - [[pthread_spinlock_t *lock; + [[pthread_spinlock_t lock; return pthread_spin_init (&lock, 0); ]]) ], diff --git a/m4/pthread_mutex_timedlock.m4 b/m4/pthread_mutex_timedlock.m4 index e101bb96d9..dda6f5889c 100644 --- a/m4/pthread_mutex_timedlock.m4 +++ b/m4/pthread_mutex_timedlock.m4 @@ -1,4 +1,4 @@ -# pthread_mutex_timedlock.m4 serial 3 +# pthread_mutex_timedlock.m4 serial 3.1 dnl Copyright (C) 2019-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -26,7 +26,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK], [[#include #include ]], - [[pthread_mutex_t *lock; + [[pthread_mutex_t lock; return pthread_mutex_timedlock (&lock, (struct timespec *) 0); ]]) ],