210-deactivate-sched_setscheduler.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. When compiled with glibc the config_scan.c wants to use the
  2. cpupolicy2numeric() function which is only available when
  3. HAVE_SCHED_SETSCHEDULER is set. It looks like the wrong define was used here.
  4. This fixes a build problem with glibc in combination with the force
  5. ac_cv_func_sched_setscheduler=no in the OpenWrt CONFIGURE_VARS.
  6. --- a/lib/config_scan.c
  7. +++ b/lib/config_scan.c
  8. @@ -3891,7 +3891,7 @@ YY_RULE_SETUP
  9. SERRX(0);
  10. #else /* !SOCKS_CLIENT */
  11. -#if HAVE_SCHED_SETAFFINITY
  12. +#if HAVE_SCHED_SETSCHEDULER
  13. BEGIN(0);
  14. @@ -3899,9 +3899,9 @@ YY_RULE_SETUP
  15. yyerrorx("unknown scheduling policy \"%s\"", yytext);
  16. return SCHEDULEPOLICY;
  17. -#else /* !HAVE_SCHED_SETAFFINITY */
  18. +#else /* !HAVE_SCHED_SETSCHEDULER */
  19. yyerrorx("setting cpu scheduling policy is not supported on this platform");
  20. -#endif /* !HAVE_SCHED_SETAFFINITY */
  21. +#endif /* !HAVE_SCHED_SETSCHEDULER */
  22. #endif /* SOCKS_CLIENT */
  23. }
  24. --- a/lib/config_scan.l
  25. +++ b/lib/config_scan.l
  26. @@ -456,7 +456,7 @@ cpu {
  27. SERRX(0);
  28. #else /* !SOCKS_CLIENT */
  29. -#if HAVE_SCHED_SETAFFINITY
  30. +#if HAVE_SCHED_SETSCHEDULER
  31. BEGIN(0);
  32. @@ -464,9 +464,9 @@ cpu {
  33. yyerrorx("unknown scheduling policy \"%s\"", yytext);
  34. return SCHEDULEPOLICY;
  35. -#else /* !HAVE_SCHED_SETAFFINITY */
  36. +#else /* !HAVE_SCHED_SETSCHEDULER */
  37. yyerrorx("setting cpu scheduling policy is not supported on this platform");
  38. -#endif /* !HAVE_SCHED_SETAFFINITY */
  39. +#endif /* !HAVE_SCHED_SETSCHEDULER */
  40. #endif /* SOCKS_CLIENT */
  41. }