summaryrefslogtreecommitdiff
path: root/lib/getopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getopt.c')
-rw-r--r--lib/getopt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/getopt.c b/lib/getopt.c
index a7db39b68df..9a2867db277 100644
--- a/lib/getopt.c
+++ b/lib/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 __WIN32__) && ! defined __CYGWIN__))
# define flockfile(fp) /* nop */
# define funlockfile(fp) /* nop */
# endif