]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
only add sched_param if it is initialized
authorBenjamin Peterson <benjamin@python.org>
Tue, 2 Aug 2011 23:40:46 +0000 (18:40 -0500)
committerBenjamin Peterson <benjamin@python.org>
Tue, 2 Aug 2011 23:40:46 +0000 (18:40 -0500)
Modules/posixmodule.c

index 918ffb655c56158dc24b4f0a1066f683751104fe..e6d70d385e6e937272041e9fdfd5b2618719eec3 100644 (file)
@@ -10965,8 +10965,11 @@ INITFUNC(void)
     Py_INCREF((PyObject*) &StatVFSResultType);
     PyModule_AddObject(m, "statvfs_result",
                        (PyObject*) &StatVFSResultType);
+
+#if defined(HAVE_SCHED_SETPARAM) || defined(HAVE_SCHED_SETSCHEDULER)
     Py_INCREF(&SchedParamType);
     PyModule_AddObject(m, "sched_param", (PyObject *)&SchedParamType);
+#endif
     initialized = 1;
 
 #ifdef __APPLE__