aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/dante/patches/210-deactivate-sched_setscheduler.patch
blob: e711189c59fff7b46107dcc4d11b9b22d4d553e2 (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
53
When compiled with glibc the config_scan.c wants to use the 
cpupolicy2numeric() function which is only available when 
HAVE_SCHED_SETSCHEDULER is set. It looks like the wrong define was used here.

This fixes a build problem with glibc in combination with the force 
ac_cv_func_sched_setscheduler=no in the OpenWrt CONFIGURE_VARS.

--- a/lib/config_scan.c
+++ b/lib/config_scan.c
@@ -3891,7 +3891,7 @@ YY_RULE_SETUP
    SERRX(0);
 
 #else /* !SOCKS_CLIENT */
-#if HAVE_SCHED_SETAFFINITY
+#if HAVE_SCHED_SETSCHEDULER
 
    BEGIN(0);
 
@@ -3899,9 +3899,9 @@ YY_RULE_SETUP
       yyerrorx("unknown scheduling policy \"%s\"", yytext);
 
    return SCHEDULEPOLICY;
-#else /* !HAVE_SCHED_SETAFFINITY */
+#else /* !HAVE_SCHED_SETSCHEDULER */
    yyerrorx("setting cpu scheduling policy is not supported on this platform");
-#endif /* !HAVE_SCHED_SETAFFINITY */
+#endif /* !HAVE_SCHED_SETSCHEDULER */
 
 #endif /* SOCKS_CLIENT */
 }
--- a/lib/config_scan.l
+++ b/lib/config_scan.l
@@ -456,7 +456,7 @@ cpu {
    SERRX(0);
 
 #else /* !SOCKS_CLIENT */
-#if HAVE_SCHED_SETAFFINITY
+#if HAVE_SCHED_SETSCHEDULER
 
    BEGIN(0);
 
@@ -464,9 +464,9 @@ cpu {
       yyerrorx("unknown scheduling policy \"%s\"", yytext);
 
    return SCHEDULEPOLICY;
-#else /* !HAVE_SCHED_SETAFFINITY */
+#else /* !HAVE_SCHED_SETSCHEDULER */
    yyerrorx("setting cpu scheduling policy is not supported on this platform");
-#endif /* !HAVE_SCHED_SETAFFINITY */
+#endif /* !HAVE_SCHED_SETSCHEDULER */
 
 #endif /* SOCKS_CLIENT */
 }