aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/getopt.c4
-rw-r--r--lib/getopt.in.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/getopt.c b/lib/getopt.c
index 1d14b245..f8fc003d 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -29,7 +29,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
+#ifndef _MSC_VER
+# include <unistd.h>
+#endif
#ifdef __VMS
# include <unixlib.h>
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
index ea77e3d7..c50dda00 100644
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -34,7 +34,9 @@
#if defined __GETOPT_PREFIX && !defined __need_getopt
# include <stdlib.h>
# include <stdio.h>
-# include <unistd.h>
+# ifndef _MSC_VER
+# include <unistd.h>
+# endif
# undef __need_getopt
# undef getopt
# undef getopt_long