Commit 99db8038 authored by Tanu Kaskinen's avatar Tanu Kaskinen

build-sys: Build atomic-test only if pthread_setaffinity_np() is available

The function seems to be essential to the test, so the test has to be
disabled entirely if pthread_setaffinity_np() is not available.

Fixes: #850
parent 4d1e5686
......@@ -561,10 +561,12 @@ AC_FUNC_GETGROUPS
AC_CHECK_FUNCS_ONCE([chmod chown fstat fchown fchmod clock_gettime getaddrinfo getgrgid_r getgrnam_r \
getpwnam_r getpwuid_r gettimeofday getuid mlock nanosleep \
pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \
sigaction sleep symlink sysconf uname pthread_setaffinity_np pthread_getname_np pthread_setname_np])
sigaction sleep symlink sysconf uname pthread_getname_np pthread_setname_np])
AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
AC_SUBST(HAVE_MKFIFO)
AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
AC_CHECK_FUNCS([pthread_setaffinity_np], [HAVE_PTHREAD_SETAFFINITY_NP=1], [HAVE_PTHREAD_SETAFFINITY_NP=0])
AM_CONDITIONAL(HAVE_PTHREAD_SETAFFINITY_NP, test "x$HAVE_PTHREAD_SETAFFINITY_NP" = "x1")
# X/OPEN
AC_CHECK_FUNCS_ONCE([readlink])
......
......@@ -296,8 +296,7 @@ TESTS_norun = \
sig2str-test \
stripnul \
echo-cancel-test \
lo-latency-test \
atomic-test
lo-latency-test
# These tests need a running pulseaudio daemon
TESTS_daemon = \
......@@ -316,6 +315,11 @@ TESTS_default += \
usergroup-test
endif
if HAVE_PTHREAD_SETAFFINITY_NP
TESTS_norun += \
atomic-test
endif
if HAVE_SYS_EVENTFD_H
TESTS_default += \
srbchannel-test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment