From 7b4afba88a7f5f1d4754d67fe749df02743e2b05 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Tue, 6 Mar 2012 11:32:25 +0100 Subject: [PATCH 01/16] Check properly for sched_setshceduler This funtion is not implemented in osx for instance --- configure.ac | 2 +- libvisual/lv_os.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 71d5773..cd944f8 100644 --- a/configure.ac +++ b/configure.ac @@ -142,7 +142,7 @@ AC_C_BIGENDIAN(bigendian=yes, bigendian=no, ) AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES -AC_CHECK_FUNCS([gettimeofday usleep nanosleep select memset sqrt strdup strndup sysconf]) +AC_CHECK_FUNCS([gettimeofday usleep nanosleep select memset sqrt strdup strndup sysconf sched_setscheduler]) AC_CHECK_LIB([dl], [dlsym], [LIBS="-ldl $LIBS"], AC_MSG_WARN([*** You need dlsym() to make use of Libvisual.])) diff --git a/libvisual/lv_os.c b/libvisual/lv_os.c index 2af04d7..800147e 100644 --- a/libvisual/lv_os.c +++ b/libvisual/lv_os.c @@ -31,12 +31,16 @@ #ifdef HAVE_SCHED_H # include # include +#ifdef HAVE_SCHED_SETSCHEDULER # define HAVE_SCHED 1 +#endif #elif defined HAVE_SYS_SCHED_H # include # include +#ifdef HAVE_SCHED_SETSCHEDULER # define HAVE_SCHED 1 #endif +#endif #include "lv_os.h" -- 2.1.4