5.7-r2: compilation error: implicit declaration of function 'dl_task'

Trying to build 5.7-r2 on 5.7.7-rc1:

  CC      kernel/trace/trace_sched_wakeup.o
kernel/trace/trace_sched_wakeup.c: In function 'probe_wakeup':
kernel/trace/trace_sched_wakeup.c:548:35: error: implicit declaration of function 'dl_task'; did you mean 'rt_task'? [-Werror=implicit-function-declaration]
  548 |  if (tracing_dl || (wakeup_dl && !dl_task(p)) ||
      |                                   ^~~~~~~
      |                                   rt_task

Looking at kernel/include/deadline.h it seems the nesting of SCHED_ALT/SCHED_BMQ excludes the definition in the header file. Not sure what the fix here would be.

Edited by Holger Hoffstätte