bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fchmodat: Use /proc on Cygwin


From: Ken Brown
Subject: [PATCH] fchmodat: Use /proc on Cygwin
Date: Thu, 23 Jul 2020 13:44:22 -0400

* lib/fchmodat.c (fchmodat): Use /proc on Cygwin.
---
 ChangeLog      | 4 ++++
 lib/fchmodat.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8cac948ad..9d6051f76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-07-23  Ken Brown  <kbrown@cornell.edu>
+
+       * lib/fchmodat.c (fchmodat): Use /proc on Cygwin.
+
 2020-07-21  Bruno Haible  <bruno@clisp.org>
 
        aligned-malloc: Optionally use aligned_alloc.
diff --git a/lib/fchmodat.c b/lib/fchmodat.c
index 895016860..eee0a1c56 100644
--- a/lib/fchmodat.c
+++ b/lib/fchmodat.c
@@ -98,7 +98,7 @@ fchmodat (int dir, char const *file, mode_t mode, int flags)
           return -1;
         }
 
-#   if defined __linux__ || defined __ANDROID__
+#   if defined __linux__ || defined __ANDROID__ || defined __CYGWIN__
       static char const fmt[] = "/proc/self/fd/%d";
       char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
       sprintf (buf, fmt, fd);
-- 
2.27.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]