Skip to content

Commit

Permalink
Patch zlib to fix compatibility with latest Xcode (bazelbuild#18000)
Browse files Browse the repository at this point in the history
Fixes bazelbuild#17956

Partial commit for third_party/*, see bazelbuild#17987.

Closes bazelbuild#17987

Signed-off-by: Yun Peng <pcloudy@google.com>
Co-authored-by: Yun Peng <pcloudy@google.com>
  • Loading branch information
ShreeM01 and meteorcloudy authored Apr 11, 2023
1 parent 1641fa8 commit 44544ae
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions third_party/zlib/gzguts.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/

#ifndef _WIN32
#include <unistd.h>
#endif

#ifdef _LARGEFILE64_SOURCE
# ifndef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE 1
Expand Down
15 changes: 15 additions & 0 deletions third_party/zlib/zlib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/third_party/zlib/gzguts.h b/third_party/zlib/gzguts.h
index 57faf37165..54f668fcb2 100644
--- a/third_party/zlib/gzguts.h
+++ b/third_party/zlib/gzguts.h
@@ -3,6 +3,10 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/

+#ifndef _WIN32
+ #include <unistd.h>
+#endif
+
#ifdef _LARGEFILE64_SOURCE
# ifndef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE 1

0 comments on commit 44544ae

Please sign in to comment.