From feac6c8e24dbf37d22195a8e6f66b5b2ac4172c6 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 3 Jun 2024 12:43:06 +0200 Subject: [PATCH] mtx tests: Fix a possible link error. * modules/mtx-tests (Files): Add m4/semaphore.m4. (configure.ac): Require gl_SEMAPHORE. (Makefile.am): Link test-mtx with @LIB_SEMAPHORE@. --- ChangeLog | 7 +++++++ modules/mtx-tests | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0380cf7bcb..b20d874291 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-06-03 Bruno Haible + + mtx tests: Fix a possible link error. + * modules/mtx-tests (Files): Add m4/semaphore.m4. + (configure.ac): Require gl_SEMAPHORE. + (Makefile.am): Link test-mtx with @LIB_SEMAPHORE@. + 2024-06-03 Bruno Haible pthread-mutex, pthread-rwlock: Fix a compilation error. diff --git a/modules/mtx-tests b/modules/mtx-tests index 063a56d67f..323d392087 100644 --- a/modules/mtx-tests +++ b/modules/mtx-tests @@ -2,6 +2,7 @@ Files: tests/test-mtx.c tests/atomic-int-isoc.h tests/macros.h +m4/semaphore.m4 Depends-on: thrd @@ -12,8 +13,9 @@ random configure.ac: AC_CHECK_HEADERS_ONCE([semaphore.h]) AC_CHECK_DECLS_ONCE([alarm]) +AC_REQUIRE([gl_SEMAPHORE]) Makefile.am: TESTS += test-mtx check_PROGRAMS += test-mtx -test_mtx_LDADD = $(LDADD) @LIBSTDTHREAD@ @LIBTHREAD@ +test_mtx_LDADD = $(LDADD) @LIBSTDTHREAD@ @LIBTHREAD@ @LIB_SEMAPHORE@ -- 2.39.5