compilation error fixes in sched.c and sched.d