You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declare Z_HAVE_UNISTD_H on non-windows platforms for zlib
This avoids an error when compiling zlib with ISO C99 conforming compilers:
```
external/zlib.hs/gzwrite.c:78:20: error: call to undeclared function 'write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
writ = write(state->fd, strm->next_in, put);
^
external/zlib.hs/gzwrite.c:78:20: note: did you mean 'fwrite'?
/nix/store/51c1k4sj0irwgyvkgbyhqi0ggilyh3j2-Libsystem-1238.60.2/include/stdio.h:254:9: note: 'fwrite' declared here
size_t fwrite(const void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream) __DARWIN_ALIAS(fwrite);
^
external/zlib.hs/gzwrite.c:108:24: error: call to undeclared function 'write'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
writ = write(state->fd, state->x.next, put);
^
external/zlib.hs/gzwrite.c:627:9: error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (close(state->fd) == -1)
^
3 errors generated.
```
0 commit comments