aboutsummaryrefslogtreecommitdiff
path: root/librt
diff options
context:
space:
mode:
authorGravatar Mike Frysinger <vapier@gentoo.org>2012-03-26 23:37:21 -0400
committerGravatar Mike Frysinger <vapier@gentoo.org>2012-03-26 23:42:24 -0400
commitd8b4e7a80cb92b7d4562ca78f65ba42b418ea438 (patch)
tree0427cf5334f20a94d84f7915626dbf84d47447dc /librt
parent54935c23e92c7f948ea3c561b3fac7cd4deac22a (diff)
downloaduClibc-d8b4e7a80cb92b7d4562ca78f65ba42b418ea438.tar.gz
uClibc-d8b4e7a80cb92b7d4562ca78f65ba42b418ea438.tar.bz2
spawn: do not require C99 style
Simple style tweak to build with older standards. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'librt')
-rw-r--r--librt/spawn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/librt/spawn.c b/librt/spawn.c
index b5935a1b4..0877f6f8e 100644
--- a/librt/spawn.c
+++ b/librt/spawn.c
@@ -42,8 +42,9 @@ inline static bool execute_file_actions(const posix_spawn_file_actions_t *fa)
{
struct rlimit64 fdlimit;
bool have_fdlimit = false;
+ int cnt;
- for (int cnt = 0; cnt < fa->__used; ++cnt) {
+ for (cnt = 0; cnt < fa->__used; ++cnt) {
struct __spawn_action *action = &fa->__actions[cnt];
switch (action->tag) {
@@ -143,11 +144,12 @@ __spawni(pid_t *pid, const char *file,
the sigset_t data type can be very different on different
architectures. */
struct sigaction sa;
+ int sig;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_DFL;
- for (int sig = 1; sig <= _NSIG; ++sig) {
+ for (sig = 1; sig <= _NSIG; ++sig) {
if (sigismember(&attrp->__sd, sig)) {
if (sigaction(sig, &sa, NULL) != 0)
goto error;