@@ -1942,7 +1942,7 @@ static PyTypeObject WaitidResultType;
19421942static int initialized ;
19431943static PyTypeObject StatResultType ;
19441944static PyTypeObject StatVFSResultType ;
1945- #if defined(HAVE_SCHED_SETPARAM ) || defined(HAVE_SCHED_SETSCHEDULER )
1945+ #if defined(HAVE_SCHED_SETPARAM ) || defined(HAVE_SCHED_SETSCHEDULER ) || defined( POSIX_SPAWN_SETSCHEDULER ) || defined( POSIX_SPAWN_SETSCHEDPARAM )
19461946static PyTypeObject SchedParamType ;
19471947#endif
19481948static newfunc structseq_new ;
@@ -5160,8 +5160,10 @@ enum posix_spawn_file_actions_identifier {
51605160 POSIX_SPAWN_DUP2
51615161};
51625162
5163+ #if defined(HAVE_SCHED_SETPARAM ) || defined(HAVE_SCHED_SETSCHEDULER ) || defined(POSIX_SPAWN_SETSCHEDULER ) || defined(POSIX_SPAWN_SETSCHEDPARAM )
51635164static int
51645165convert_sched_param (PyObject * param , struct sched_param * res );
5166+ #endif
51655167
51665168static int
51675169parse_posix_spawn_flags (PyObject * setpgroup , int resetids , PyObject * setsigmask ,
@@ -5925,7 +5927,7 @@ os_sched_getscheduler_impl(PyObject *module, pid_t pid)
59255927#endif /* HAVE_SCHED_SETSCHEDULER */
59265928
59275929
5928- #if defined(HAVE_SCHED_SETSCHEDULER ) || defined(HAVE_SCHED_SETPARAM )
5930+ #if defined(HAVE_SCHED_SETPARAM ) || defined( HAVE_SCHED_SETSCHEDULER ) || defined(POSIX_SPAWN_SETSCHEDULER ) || defined( POSIX_SPAWN_SETSCHEDPARAM )
59295931/*[clinic input]
59305932class os.sched_param "PyObject *" "&SchedParamType"
59315933
@@ -5986,7 +5988,7 @@ convert_sched_param(PyObject *param, struct sched_param *res)
59865988 res -> sched_priority = Py_SAFE_DOWNCAST (priority , long , int );
59875989 return 1 ;
59885990}
5989- #endif /* defined(HAVE_SCHED_SETSCHEDULER) || defined(HAVE_SCHED_SETPARAM ) */
5991+ #endif /* defined(HAVE_SCHED_SETPARAM) || defined( HAVE_SCHED_SETSCHEDULER) || defined(POSIX_SPAWN_SETSCHEDULER) || defined(POSIX_SPAWN_SETSCHEDPARAM ) */
59905992
59915993
59925994#ifdef HAVE_SCHED_SETSCHEDULER
@@ -13925,7 +13927,7 @@ INITFUNC(void)
1392513927# endif
1392613928#endif
1392713929
13928- #if defined(HAVE_SCHED_SETPARAM ) || defined(HAVE_SCHED_SETSCHEDULER )
13930+ #if defined(HAVE_SCHED_SETPARAM ) || defined(HAVE_SCHED_SETSCHEDULER ) || defined( POSIX_SPAWN_SETSCHEDULER ) || defined( POSIX_SPAWN_SETSCHEDPARAM )
1392913931 sched_param_desc .name = MODNAME ".sched_param" ;
1393013932 if (PyStructSequence_InitType2 (& SchedParamType , & sched_param_desc ) < 0 )
1393113933 return NULL ;
0 commit comments