From: nekral-guest Date: Wed, 14 Nov 2007 13:46:15 +0000 (+0000) Subject: Declare the child and pid variable at the beginning of a block. This X-Git-Tag: 4.1.0~131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d527f156df0d835aadff3ab299b5f880ab3bb25;p=shadow Declare the child and pid variable at the beginning of a block. This fixes a compilation issue with gcc 2.95. The intent is the same as Gentoo's patch shadow-4.0.12-gcc2.patch. --- diff --git a/ChangeLog b/ChangeLog index 4d7de3d2..b4743efe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-14 Nicolas François + + * src/newgrp.c, NEWS: Declare the child and pid variable at the + beginning of a block. This fixes a compilation issue with gcc 2.95. + 2007-11-14 Nicolas François * src/Makefile, NEWS: Add a suidperms variable. This should ease diff --git a/NEWS b/NEWS index e0c25103..dc2952db 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,9 @@ shadow-4.0.18.1 -> shadow-4.0.18.2 UNRELEASED directly give up. - The permissions of the suid binaries is now configurable in src/Makefile.am. Note that changing the permissions is not recommended. +- newgrp.c: Declare the child and pid variable at the beginning of a block. + This fixes a compilation issue with gcc 2.95. The intent is the same as + Gentoo's patch shadow-4.0.12-gcc2.patch. shadow-4.0.18.1 -> shadow-4.0.18.2 28-10-2007 diff --git a/src/newgrp.c b/src/newgrp.c index 38115731..ae2b8d7e 100644 --- a/src/newgrp.c +++ b/src/newgrp.c @@ -454,6 +454,7 @@ int main (int argc, char **argv) * avoid any possibility of the parent being stopped when it * receives SIGCHLD from the terminating subshell. -- JWP */ + { pid_t child, pid; signal (SIGINT, SIG_IGN); @@ -502,6 +503,7 @@ int main (int argc, char **argv) signal (SIGTSTP, SIG_DFL); signal (SIGTTIN, SIG_DFL); signal (SIGTTOU, SIG_DFL); + } #endif /* USE_PAM */ } #endif /* USE_SYSLOG */