Skip to content

Update zlib to 1.3.1 to fix macOS SDK 26 build - #9

Merged
Laguna1989 merged 1 commit into
masterfrom
fix/zlib-1.3.1-macos-sdk
Aug 29, 2026
Merged

Laguna1989 merged 1 commit into
masterfrom
fix/zlib-1.3.1-macos-sdk

Conversation

@Laguna1989

Copy link
Copy Markdown
Owner

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

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
@Laguna1989
Laguna1989 merged commit 5c7e437 into master Aug 29, 2026
6 of 7 checks passed
@Laguna1989
Laguna1989 deleted the fix/zlib-1.3.1-macos-sdk branch August 29, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant