Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix platform check for macOS #895

Closed
wants to merge 1 commit into from

Commits on Dec 12, 2023

  1. Fix platform check for macOS

    `zutils.h` contains configurations that are no longer exercised for
    the macOS target.
    - The target OS conditional macros are misused. Specifically
      `TARGET_OS_MAC` covers all Apple targets, including iOS,
      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.
    
    This problem has not been noticed until a recent extension in clang
    (llvm/llvm-project#74676) exposed the issue
    and broke zlib builds on Apple platforms.
    zixu-w committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    805d678 View commit details
    Browse the repository at this point in the history