about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--posix/getopt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/posix/getopt.c b/posix/getopt.c
index a160a4e3bd..128dc7fcf5 100644
--- a/posix/getopt.c
+++ b/posix/getopt.c
@@ -45,7 +45,8 @@
 # define _(msgid) gettext (msgid)
 /* When used standalone, flockfile and funlockfile might not be
    available.  */
-# ifndef _POSIX_THREAD_SAFE_FUNCTIONS
+# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
+      || (defined _WIN32 && ! defined __CYGWIN__))
 #  define flockfile(fp) /* nop */
 #  define funlockfile(fp) /* nop */
 # endif