fix sched defines
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index d7a03ce..752fdf7 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -10950,7 +10950,7 @@
 #  endif
 #endif
 
-#ifdef HAVE_SCHED_H
+#if defined(HAVE_SCHED_SETPARAM) || defined(HAVE_SCHED_SETSCHEDULER)
         sched_param_desc.name = MODNAME ".sched_param";
         PyStructSequence_InitType(&SchedParamType, &sched_param_desc);
         SchedParamType.tp_new = sched_param_new;