From 6361efe6e2c3c3a2cd63ce91563ee02b792beddd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 20 Feb 2017 22:34:24 +0100 Subject: [PATCH] lock tests: Fix build failure on z/OS. Reported by Daniel Richard G. . * modules/lock-tests (configure.ac): Test for . * tests/test-lock.c (USE_SEMAPHORE): Don't set if does not exist. --- ChangeLog | 8 ++++++++ modules/lock-tests | 1 + tests/test-lock.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2feb632787..e5dd80d663 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-02-20 Bruno Haible + + lock tests: Fix build failure on z/OS. + Reported by Daniel Richard G. . + * modules/lock-tests (configure.ac): Test for . + * tests/test-lock.c (USE_SEMAPHORE): Don't set if does not + exist. + 2017-02-19 Bruno Haible havelib: Prefer the search path of /usr/bin/gcc over the one of $CC. diff --git a/modules/lock-tests b/modules/lock-tests index b7f1a73663..bfab1f4576 100644 --- a/modules/lock-tests +++ b/modules/lock-tests @@ -8,6 +8,7 @@ usleep yield configure.ac: +AC_CHECK_HEADERS_ONCE([semaphore.h]) Makefile.am: TESTS += test-rwlock1 test-lock diff --git a/tests/test-lock.c b/tests/test-lock.c index f3da4ccdfd..c6bc399f7d 100644 --- a/tests/test-lock.c +++ b/tests/test-lock.c @@ -58,7 +58,7 @@ synchronization/communication between different CPUs. */ #define USE_VOLATILE 0 -#if USE_POSIX_THREADS +#if USE_POSIX_THREADS && HAVE_SEMAPHORE_H /* Whether to use a semaphore to communicate information between threads. If set to 0, a lock is used. If set to 1, a semaphore is used. Uncomment this to reduce the dependencies of this test. */ -- 2.39.5