>From 1bbbce29dc592833e79ab6d21472528a01ab67b2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 8 Feb 2020 20:41:20 +0100 Subject: [PATCH 2/3] 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'. --- ChangeLog | 6 ++++++ lib/fchmodat.c | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32d9a00..a5ca210 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 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. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Require AC_CANONICAL_HOST. When cross-compiling, guess depending on the platform. diff --git a/lib/fchmodat.c b/lib/fchmodat.c index c6b8ef7..87aa0d1 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 -- 2.7.4