# HG changeset patch # User Christian Weisgerber # Date 1288105055 21600 # Node ID bac537e8b09ce92bedf876f6963564102d64c487 # Parent d5c7df91532837b58bc4c35c9c00967e33e34979 fdopendir: fix C89 compilation * lib/fdopendir.c (fd_clone_opendir): Move declaration for older compilers. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-26 Christian Weisgerber (tiny change) + + fdopendir: fix C89 compilation + * lib/fdopendir.c (fd_clone_opendir): Move declaration for older + compilers. + 2010-10-23 Paul Eggert inttostr: simplify by removing unnecessary redundancy diff --git a/lib/fdopendir.c b/lib/fdopendir.c --- a/lib/fdopendir.c +++ b/lib/fdopendir.c @@ -142,6 +142,7 @@ # else /* !REPLACE_FCHDIR */ /* Occupy the destination FD slot, so that save_cwd cannot hijack it. */ + struct saved_cwd saved_cwd; int fd_reserve = dup (fd); if (fd_reserve < 0) { @@ -150,7 +151,6 @@ goto fail; } - struct saved_cwd saved_cwd; if (save_cwd (&saved_cwd) != 0) openat_save_fail (errno);