sched_getcpu() and pthread_setaffinity_np() are non-portable

Reported by Yuri Victorovich, on FreeBSD.

* configure.ac: Test for them.
* spot/mc/mc_instanciator.hh: Only use them if they are present.
* NEWS: Mention the fix.
This commit is contained in:
Alexandre Duret-Lutz 2021-11-22 10:23:14 +01:00
parent 5f49209caf
commit 2a408bbed1
3 changed files with 14 additions and 5 deletions

View file

@ -148,7 +148,12 @@ CHECK_ATOMIC
AX_CHECK_BUDDY
AC_CHECK_HEADERS([sys/times.h valgrind/memcheck.h spawn.h])
AC_CHECK_FUNCS([times kill alarm sigaction])
AC_CHECK_FUNCS([times kill alarm sigaction sched_getcpu])
oLIBS=$LIBS
LIBS="$LIBS -lpthread"
AC_CHECK_FUNCS([pthread_setaffinity_np])
LIBS=$oLIBS
LT_CONFIG_LTDL_DIR([ltdl])
LT_INIT([win32-dll])