From e3298dda6dfb5427b3beab142e563d65c1bd5e84 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 2 Aug 2011 18:40:46 -0500 Subject: [PATCH] only add sched_param if it is initialized --- Modules/posixmodule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 918ffb655c5..e6d70d385e6 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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__