summaryrefslogtreecommitdiff
blob: 5522e9d7e602f2ea03753b06bea9937d5e01a597 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
* grobian@gentoo.org: Darwin 8 lacks sched_setscheduler

https://sourceforge.net/tracker/index.php?func=detail&aid=2606558&group_id=4393&atid=304393

--- a/configure.ac
+++ b/configure.ac
@@ -244,7 +244,7 @@
 
 dnl Checks for library functions.
 AC_FUNC_MMAP
-AC_CHECK_FUNCS(gettimeofday)
+AC_CHECK_FUNCS(gettimeofday sched_get_priority_max sched_setscheduler)
 
 AC_SUBST(ac_aux_dir)
 AC_SUBST(RPM_RELEASE)
--- a/configure
+++ b/configure
@@ -22621,7 +22621,7 @@
 rm -f conftest.mmap
 
 
-for ac_func in gettimeofday
+for ac_func in gettimeofday sched_get_priority_max sched_setscheduler
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
--- a/config.h.in
+++ b/config.h.in
@@ -24,6 +24,12 @@
 /* Define to 1 if you have the `gettimeofday' function. */
 #undef HAVE_GETTIMEOFDAY
 
+/* Define to 1 if you have the `sched_get_priority_max' function. */
+#undef HAVE_SCHED_GET_PRIORITY_MAX
+
+/* Define to 1 if you have the `sched_setscheduler' function. */
+#undef HAVE_SCHED_SETSCHEDULER
+
 /* Define as 1 if you have gtk */
 #undef HAVE_GTK
 
--- a/encodedv/dvconnect.c
+++ b/encodedv/dvconnect.c
@@ -860,7 +860,7 @@
 
 int rt_raisepri (int pri)
 {
-#ifdef _SC_PRIORITY_SCHEDULING
+#if defined(_SC_PRIORITY_SCHEDULING) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_SETSCHEDULER)
 	struct sched_param scp;
 
 	/*