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
`zutils.h` contains obsolete configurations for the macOS target that
are bug-prone and no longer exercised.
- The target OS conditional macros are misused for modern Apple
platforms. `TARGET_OS_MAC` covers all Apple targets including iOS and
so on. And it should not be checked with `#if defined` as they would
always be defined (to either 1 or 0) on Apple platforms.
- The assumption that macOS does not have `fdopen`, or defines `fdopen`
as a macro is no longer valid. The null definition in `zutils.h` would
conflict with the macOS SDK and cause a compilation failure.
The problem hasn't manifested because the code path hasn't been
exercised for years because of the outdated `TARGET_OS` guard.
A recent extension in clang (llvm/llvm-project#74676)
would expose the issue and break zlib builds on Apple platforms.
0 commit comments