Skip to content

Update bundled zlib to 1.3.1 for macOS SDK compatibility#3460

Merged
AliaksandrDziarkach merged 2 commits intomasterfrom
copilot/update-zlib-library-version
Jan 23, 2026
Merged

Update bundled zlib to 1.3.1 for macOS SDK compatibility#3460
AliaksandrDziarkach merged 2 commits intomasterfrom
copilot/update-zlib-library-version

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 23, 2026

Remove-me-section

  • Notify reviewers about the pull request
  • Keep only necessary sections below for the review
  • Summary: Recent macOS SDK headers expose a conflict with the bundled zlib 1.2.12; this updates the vendored zlib to a version compatible with modern Apple Clang.
  • Bundled library update: Refreshed third_party/zlib headers and sources to upstream 1.3.1, including updated README/ChangeLog metadata.

Example snippet:

#define ZLIB_VERSION "1.3.1"

Generic request

  • PR name follows the pattern #1234 – issue name
  • branch name does not contain '#'
  • base branch (master or release/xx) is correct
  • PR is linked with the issue
  • task status changed to "Code review"
  • code follows product standards
  • regression tests updated

For release/xx branch

  • backmerge to master (or newer release/xx) branch is created

Optional

  • unit-tests written
  • documentation updated

Backmerge request

  • PR name follows the pattern Backmerge: #1234 – issue name
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • code contains only backmerge changes

Bump request

  • PR name follows the pattern Bump version to ...
  • add brackets [ ] for 'skip ci' and put it into the body
  • milestone is linked to PR
  • all tickets are closed inside the relevant milestone

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • zlib.net
    • Triggering command: /usr/bin/curl curl -fsSL REDACTED -o zlib-1.3.1.tar.gz -imultiarch on.c.o xman.dir/Debug/p/tmp/ccsGHTtr.s third_party/inchas lerplate/cairo-b-I third_party/inch/usr/include/freetype2 as --gd�� UNASVG_BUILD_STA-o -o s /tmp/ccDN1c7T.s (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Update zlib library to latest version</issue_title>
<issue_description>Summary
Now we have error during compilation: MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
It typically occurs when building software on recent versions of macOS (especially macOS 15.4 with Xcode 16 and Apple Clang 17/LLVM 19) due to an incompatibility with the system's updated SDK headers.
This issue is most frequently tied to an outdated, bundled version of the zlib library within the project you are trying to compile. The problem arises from conflicting declarations of the fdopen function, where the macOS SDK defines it in a way that clashes with the older zlib source code.

Solution
Update the bundled library: The most robust solution is to update the problematic library (usually zlib) to a version compatible with the newer Clang compilers (zlib 1.3.1 or newer incorporates the fix). Many projects have already applied this fix, so checking for a newer version of your project's source code is a good first step.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Copilot AI changed the title [WIP] Update zlib library to latest version Update bundled zlib to 1.3.1 for macOS SDK compatibility Jan 23, 2026
Copilot AI requested a review from AlexeyGirin January 23, 2026 07:27
@AlexeyGirin AlexeyGirin marked this pull request as ready for review January 23, 2026 08:39
@AlexeyGirin AlexeyGirin requested review from AliaksandrDziarkach and removed request for AlexeyGirin January 23, 2026 08:54
@AliaksandrDziarkach AliaksandrDziarkach merged commit 59d3ea8 into master Jan 23, 2026
65 of 66 checks passed
@AliaksandrDziarkach AliaksandrDziarkach deleted the copilot/update-zlib-library-version branch January 23, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update zlib library to latest version

3 participants