提交 130a5663 authored 作者: Michael Jerris's avatar Michael Jerris

attempt to properly check if we can use CPU_SET with sched_setaffinity because…

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@16266 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 563b20b8
......@@ -8,7 +8,7 @@ AC_CHECK_FUNCS(sched_setaffinity sched_getaffinity)
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"
CFLAGS="$CFLAGS $SWITCH_AM_CFLAGS $SWITCH_ANSI_CFLAGS -D_GNU_SOURCE"
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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论