From f5b70b135a355d7f957ddd8119a802f3d3bb4958 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 12 Feb 2024 12:18:34 +0100 Subject: [PATCH] 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 --- ChangeLog | 8 ++++++++ m4/pthread-spin.m4 | 4 ++-- m4/pthread_mutex_timedlock.m4 | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e15f678e49..7e357c4124 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-11 Bruno Haible Fulfil the obligations of the Unicode license. diff --git a/m4/pthread-spin.m4 b/m4/pthread-spin.m4 index daf9462b52..05c38ba3cc 100644 --- a/m4/pthread-spin.m4 +++ b/m4/pthread-spin.m4 @@ -1,4 +1,4 @@ -# pthread-spin.m4 serial 5 +# pthread-spin.m4 serial 6 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 1dc4c8c682..1926b7eb6b 100644 --- a/m4/pthread_mutex_timedlock.m4 +++ b/m4/pthread_mutex_timedlock.m4 @@ -1,4 +1,4 @@ -# pthread_mutex_timedlock.m4 serial 4 +# pthread_mutex_timedlock.m4 serial 5 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); ]]) ], -- 2.39.5