Skip to content

clock_gettime is now defined in macOS 10.12 SDK #2175

@robertcastle

Description

@robertcastle

System Info: macOS 10.11, Xcode 8 with macOS 10.12 SDK
libZMQ version: commit 2e92643

Problem:

  • Prior to macOS 10.12 clock_gettime was not defined, requiring a custom implementation in libZMQ.
  • When using macOS 10.12 libzmq should use the system clock_gettime, but when targeting 10.11 or earlier it should use the custom implementation.

How to Reproduce:

  • Install Xcode 8 on macOS 10.11, then build and run tests
  • Target 10.11 when building on macOS 10.12

Tests will fail with dyld: lazy symbol binding failed: Symbol not found: _clock_gettime

Solution:
Rename the custom implementation of clock_gettime for macOS and wrap all usage in preprocessor macros to only enable the alternative version when using macOS 10.11 or earlier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions