]> Savannah Git Hosting - gnulib.git/commitdiff
fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07).
authorBruno Haible <bruno@clisp.org>
Sat, 8 Feb 2020 19:41:20 +0000 (20:41 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 8 Feb 2020 19:41:20 +0000 (20:41 +0100)
* lib/fchmodat.c (orig_fchmodat): Move definition to immediately after
'#undef __need_system_sys_stat_h'.

ChangeLog
lib/fchmodat.c

index 32d9a00c3b03ce81adaf46b1172c0b681428b471..a5ca210e0eef739822baf3f7d3dd26ce9c6f5d07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-02-08  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        fchmodat: Improve cross-compilation guesses.
index c6b8ef768efb48235b02ce1f130f350e42d52fd3..87aa0d191ad34356cb469782d7e1855d530ab93e 100644 (file)
 #include <sys/stat.h>
 #undef __need_system_sys_stat_h
 
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
 #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 <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
 #ifdef __osf__
 /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
    eliminates this include because of the preliminary #include <sys/stat.h>