X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fspawnattr_getschedpolicy.c;h=3415ca54f354948308971f1fd888d426b4840f27;hb=47cb657eca1abf2c26c32c8ce03def994a3ee37c;hp=58d44b754861630876fb07096196d87dd24a5329;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/lib/spawnattr_getschedpolicy.c b/lib/spawnattr_getschedpolicy.c index 58d44b754..3415ca54f 100644 --- a/lib/spawnattr_getschedpolicy.c +++ b/lib/spawnattr_getschedpolicy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2009-2011 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 @@ -26,8 +26,11 @@ int posix_spawnattr_getschedpolicy (const posix_spawnattr_t *attr, int *schedpolicy) { + /* Do nothing if POSIX_SPAWN_SETSCHEDULER is unsupported. */ +#if POSIX_SPAWN_SETSCHEDULER != 0 /* Copy the scheduling policy. */ *schedpolicy = attr->_policy; +#endif return 0; }