X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fspawnattr_setschedpolicy.c;h=df93f5206f9ee096bfe715052ae9622f3c457dc7;hb=0874a5828bbb4784e9c9d54243b3c978e8e54ece;hp=e5fd0bceb51f1bb51ec7fca8a48fe29b2b3986e1;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/lib/spawnattr_setschedpolicy.c b/lib/spawnattr_setschedpolicy.c index e5fd0bceb..df93f5206 100644 --- a/lib/spawnattr_setschedpolicy.c +++ b/lib/spawnattr_setschedpolicy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -25,12 +25,15 @@ int posix_spawnattr_setschedpolicy (posix_spawnattr_t *attr, int schedpolicy) { + /* Do nothing if POSIX_SPAWN_SETSCHEDULER is unsupported. */ +#if POSIX_SPAWN_SETSCHEDULER != 0 if (schedpolicy != SCHED_OTHER && schedpolicy != SCHED_FIFO && schedpolicy != SCHED_RR) return EINVAL; /* Store the policy. */ attr->_policy = schedpolicy; +#endif return 0; }