git: 6010a892b425 - main - zlib: Fix bootstrap build on macOS

From: Jessica Clarke <jrtc27_at_FreeBSD.org>
Date: Tue, 07 Dec 2021 00:24:46 UTC
The branch main has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=6010a892b4258e90037dabf9765066d07b86f13f

commit 6010a892b4258e90037dabf9765066d07b86f13f
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2021-12-06 22:24:42 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2021-12-07 00:24:19 +0000

    zlib: Fix bootstrap build on macOS
    
    gzlib.c uses lseek but does not include unistd.h, where it is defined to
    live. On FreeBSD this happens to work due to sys/types.h declaring it,
    but on macOS it fails due to being only implicitly declared, which is
    treated as an error by default by the system Clang.
    
    MFC after:      1 week
---
 sys/contrib/zlib/gzlib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/contrib/zlib/gzlib.c b/sys/contrib/zlib/gzlib.c
index b4cb5e4a48cf..ea34341d5d5e 100644
--- a/sys/contrib/zlib/gzlib.c
+++ b/sys/contrib/zlib/gzlib.c
@@ -7,6 +7,7 @@
 
 #include "gzguts.h"
 #include "zutil.h"
+#include <unistd.h>
 
 #if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__)
 #  define LSEEK _lseeki64