dante: Fix compile with glibc
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 18 Apr 2020 15:50:03 +0000 (17:50 +0200)
committerRISCi_ATOM <Bob@bobcall.me>
Thu, 7 May 2020 18:15:08 +0000 (14:15 -0400)
commit7572abca5ca9565e463262697739f6d2c55e7326
treed66fb3747c63850ccc66a8909450faa538483e20
parent1d9ca5a21b7d6f8a61637ec9cb0a3cafa49b7253
dante: Fix compile with glibc

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.

This fixes the following compile error with glibc:
----------------------------------------------------------------------
/bin/ld: config_scan.o: in function `socks_yylex':
dante-1.4.1/sockd/config_scan.l:461: undefined reference to `cpupolicy2numeric'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:522: sockd] Error 1

Fixes: aaf46a8fe23e ("dante: disable sched_getscheduler() - not implemented in musl")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit ce1798e915181e6c1f3ba735b254b37b84261303)
package/network/utils/dante/Makefile
package/network/utils/dante/patches/210-deactivate-sched_setscheduler.patch [new file with mode: 0644]