X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fspawnattr_setschedparam.c;h=d23dff320d87043981ecbd48af6da3d58340bf46;hb=7ef6c64e210ac0979d7e8ac69bc5b5208c2405ab;hp=d07b4f1803c49d3a737c4b22afa814f1dd28806b;hpb=84d81c6ca86c3cf207ad2e8b30159fab49599f1b;p=gnulib.git diff --git a/lib/spawnattr_setschedparam.c b/lib/spawnattr_setschedparam.c index d07b4f180..d23dff320 100644 --- a/lib/spawnattr_setschedparam.c +++ b/lib/spawnattr_setschedparam.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2009-2014 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 @@ -22,10 +22,13 @@ /* Store scheduling parameters in the attribute structure. */ int posix_spawnattr_setschedparam (posix_spawnattr_t *attr, - const struct sched_param *schedparam) + const struct sched_param *schedparam) { + /* Do nothing if POSIX_SPAWN_SETSCHEDPARAM is unsupported. */ +#if POSIX_SPAWN_SETSCHEDPARAM != 0 /* Store the scheduling parameters. */ attr->_sp = *schedparam; +#endif return 0; }