summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Jansen <jansene@google.com>2019-02-07 13:46:53 -0800
committerErwin Jansen <jansene@google.com>2019-02-07 13:46:53 -0800
commitcc209a1648de25047cb37735f18fb10f7982df36 (patch)
treec08828d428c86e8232f441363d9da7c0ac5f5dc8
parent2e4f69014fda611baf61c90331db19f08865210f (diff)
downloadzlib-cc209a1648de25047cb37735f18fb10f7982df36.tar.gz
Make zlib headers compatible with MSVC
- MSVC does not provide unistd.h, so we exclude it when we are using clang with msvc. Change-Id: I9a57e61a900d46169f4f76c9bbc1295650b41e2a
-rw-r--r--zconf.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/zconf.h b/zconf.h
index 5e1d68a..92612bf 100644
--- a/zconf.h
+++ b/zconf.h
@@ -472,7 +472,9 @@ typedef uLong FAR uLongf;
#endif
#ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
-# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifndef _MSC_VER
+# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# endif
# ifdef VMS
# include <unixio.h> /* for off_t */
# endif