From: Bruno Haible <bruno@clisp.org> Date: Sun, 6 Jan 2019 08:24:04 +0000 (+0100) Subject: stdopen: Fix compilation error with IRIX cc. X-Git-Tag: v1.0~5174 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3e35b2e771b051ae6d205a3bf95bd67543b2458c;p=gnulib.git stdopen: Fix compilation error with IRIX cc. * lib/stdopen.c (stdopen): Do not use C99-style decl in loop. --- diff --git a/ChangeLog b/ChangeLog index 73a86f29ad..db51bd8cdc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-01-06 Bruno Haible <bruno@clisp.org> + + stdopen: Fix compilation error with IRIX cc. + * lib/stdopen.c (stdopen): Do not use C99-style decl in loop. + 2019-01-05 Paul Eggert <eggert@cs.ucla.edu> xfreopen need not include stdio--.h diff --git a/lib/stdopen.c b/lib/stdopen.c index 3903224e60..29350d1b8c 100644 --- a/lib/stdopen.c +++ b/lib/stdopen.c @@ -36,7 +36,8 @@ int stdopen (void) { - for (int fd = STDIN_FILENO; fd <= STDERR_FILENO; fd++) + int fd; + for (fd = STDIN_FILENO; fd <= STDERR_FILENO; fd++) { if (fcntl (fd, F_GETFD) < 0) {