From: Bruno Haible Date: Sat, 8 Feb 2020 19:41:20 +0000 (+0100) Subject: fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07). X-Git-Tag: v1.0~4259 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1bbbce29dc592833e79ab6d21472528a01ab67b2;p=gnulib.git fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07). * lib/fchmodat.c (orig_fchmodat): Move definition to immediately after '#undef __need_system_sys_stat_h'. --- diff --git a/ChangeLog b/ChangeLog index 32d9a00c3b..a5ca210e0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-02-08 Bruno Haible + + fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07). + * lib/fchmodat.c (orig_fchmodat): Move definition to immediately after + '#undef __need_system_sys_stat_h'. + 2020-02-08 Bruno Haible fchmodat: Improve cross-compilation guesses. diff --git a/lib/fchmodat.c b/lib/fchmodat.c index c6b8ef768e..87aa0d191a 100644 --- a/lib/fchmodat.c +++ b/lib/fchmodat.c @@ -26,12 +26,6 @@ #include #undef __need_system_sys_stat_h -#include -#include -#include -#include -#include - #if HAVE_FCHMODAT static int orig_fchmodat (int dir, char const *file, mode_t mode, int flags) @@ -40,6 +34,12 @@ orig_fchmodat (int dir, char const *file, mode_t mode, int flags) } #endif +#include +#include +#include +#include +#include + #ifdef __osf__ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include