Commit a872a8d
committed
(qb) Prefer system zlib on macOS
The vendored zlib in deps/libz (zlib 1.3) fails to compile against
recent macOS SDKs (tested with macOS 26.x / Xcode CLT 21). Its
zutil.h defines fdopen() as a macro expanding to NULL, which
collides with the fdopen declaration in <stdio.h>:
error: expected identifier or '('
FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(...);
Upstream zlib fixed this in 1.3.1, but rather than bump the bundled
copy for one platform, default HAVE_BUILTINZLIB to "no" on Darwin so
the system libz is used. macOS has shipped a working libz for years
and it's what the vast majority of Mac builds end up linking against
anyway.
Users who want the vendored copy can still pass --enable-builtinzlib
explicitly; the override only triggers when HAVE_BUILTINZLIB is still
at its default "auto" value.1 parent 4e75fde commit a872a8d
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
378 | 383 | | |
379 | 384 | | |
380 | 385 | | |
| |||
0 commit comments