From: Michael Jerris Date: Tue, 12 Jan 2010 18:50:02 +0000 (+0000) Subject: attempt to properly check if we can use CPU_SET with sched_setaffinity because some... X-Git-Tag: v1.0.6~787 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd422c31af0ba6e573c4876c0f8a20c2e5c96490;p=thirdparty%2Ffreeswitch.git 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@16264 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/build/config/sched_setaffinity.m4 b/build/config/sched_setaffinity.m4 index d458dbb069..ac81896fcd 100644 --- a/build/config/sched_setaffinity.m4 +++ b/build/config/sched_setaffinity.m4 @@ -7,10 +7,13 @@ 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,[ + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $SWITCH_AM_CFLAGS" AC_TRY_COMPILE( [#include ],[ 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 + CFLAGS="$saved_CFLAGS" fi -]) \ No newline at end of file +])