Fixed compile errors in sched.c