mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
attempt to properly check if we can use CPU_SET with sched_setaffinity because some older libc had gnu extensions in the definitions of CPU_SET which we do not allow (FSBUILD-226)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16263 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
16
build/config/sched_setaffinity.m4
Normal file
16
build/config/sched_setaffinity.m4
Normal file
@@ -0,0 +1,16 @@
|
||||
AC_DEFUN([AX_HAVE_CPU_SET], [
|
||||
#
|
||||
# Check for the Linux functions for controlling processor affinity.
|
||||
#
|
||||
# LINUX: sched_setaffinity
|
||||
AC_CHECK_FUNCS(sched_setaffinity sched_getaffinity)
|
||||
if test "$ac_cv_func_sched_setaffinity" = "yes" ; then
|
||||
AC_CACHE_CHECK([whether the CPU_SET and CPU_ZERO macros are defined],
|
||||
ac_cv_cpu_set_defined,[
|
||||
AC_TRY_COMPILE( [#include <sched.h>],[ cpu_set_t t; CPU_ZERO(&t); CPU_SET(1,&t); ],
|
||||
ac_cv_cpu_set_defined=yes,ac_cv_cpu_set_defined=no)])
|
||||
if test "$ac_cv_cpu_set_defined" = "yes" ; then
|
||||
AC_DEFINE(HAVE_CPU_SET_MACROS,1,[Define if CPU_SET and CPU_ZERO defined])
|
||||
fi
|
||||
fi
|
||||
])
|
Reference in New Issue
Block a user