Repository navigation
Update zlib to 1.3.1 to fix macOS SDK 26 build - #9
Merged
Merged
Conversation
zlib 1.2.13 zutil.h defines `fdopen(fd,mode) NULL` whenever
TARGET_OS_MAC is defined. The Xcode 26 SDK pulls TargetConditionals.h
in transitively via <string.h>/<stdlib.h>, so this branch now triggers
and breaks the declaration of fdopen in <stdio.h>:
_stdio.h:322:7: error: expected identifier or '('
FILE *fdopen(int, const char *) ...
zlib 1.3 removed the TARGET_OS_MAC branch entirely.
The cmake_minimum_required patch string is updated as well, since
zlib 1.3.1 uses the version range form `VERSION 2.4.4...3.15.0`.
Without that the replacement would silently do nothing and the
configure step would fail with CMake 4.
Claude-Session: https://claude.ai/code/session_019rmKmC2X2P241nNdrcKd6M
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zlib 1.2.13 zutil.h defines
fdopen(fd,mode) NULLwhenever TARGET_OS_MAC is defined. The Xcode 26 SDK pulls TargetConditionals.h in transitively via <string.h>/<stdlib.h>, so this branch now triggers and breaks the declaration of fdopen in <stdio.h>:zlib 1.3 removed the TARGET_OS_MAC branch entirely.
The cmake_minimum_required patch string is updated as well, since zlib 1.3.1 uses the version range form
VERSION 2.4.4...3.15.0. Without that the replacement would silently do nothing and the configure step would fail with CMake 4.Claude-Session: https://claude.ai/code/session_019rmKmC2X2P241nNdrcKd6M