X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fapi%2Fspawn.c;h=94511eaac5658a4543fe5840848c6d6a3162e27f;hb=2064be16d307b6409cd518303897cd0763cfdb97;hp=3fa21a62f90cc9b75c26b5301e203999c2e1abd3;hpb=0ef2646848cbc2e6c59f8757165b5790b0132281;p=libc-test diff --git a/src/api/spawn.c b/src/api/spawn.c index 3fa21a6..94511ea 100644 --- a/src/api/spawn.c +++ b/src/api/spawn.c @@ -1,4 +1,5 @@ #include +#include "options.h" #define T(t) (t*)0; #define C(n) switch(n){case n:;} static void f() @@ -11,8 +12,10 @@ T(sigset_t) T(struct sched_param) C(POSIX_SPAWN_RESETIDS) C(POSIX_SPAWN_SETPGROUP) +#ifdef POSIX_PRIORITY_SCHEDULING C(POSIX_SPAWN_SETSCHEDPARAM) C(POSIX_SPAWN_SETSCHEDULER) +#endif C(POSIX_SPAWN_SETSIGDEF) C(POSIX_SPAWN_SETSIGMASK) {int(*p)(pid_t*restrict,const char*restrict,const posix_spawn_file_actions_t*,const posix_spawnattr_t*restrict,char*const[restrict],char*const[restrict]) = posix_spawn;} @@ -37,6 +40,7 @@ static void g() {int(*p)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigdefault;} {int(*p)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigmask;} } +#ifdef POSIX_PRIORITY_SCHEDULING #include static void h() { @@ -45,3 +49,4 @@ static void h() {int(*p)(posix_spawnattr_t*restrict,const struct sched_param*restrict) = posix_spawnattr_setschedparam;} {int(*p)(posix_spawnattr_t*,int) = posix_spawnattr_setschedpolicy;} } +#endif