Skip to content

Commit

Permalink
[skip appveyor][skip cirrus] Fix a build error on macOS
Browse files Browse the repository at this point in the history
"clockid_t" is redefined when set "MACOSX_DEPLOYMENT_TARGET" to former than 10.12
  • Loading branch information
ichizok committed Jun 9, 2022
1 parent ebb01bd commit dae4f6f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/os_mac.h
Expand Up @@ -272,15 +272,14 @@

# include <dispatch/dispatch.h>

# if !defined(MAC_OS_X_VERSION_10_12) || \
(MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12)
# ifndef MAC_OS_X_VERSION_10_12
typedef int clockid_t;
# endif
# ifndef CLOCK_REALTIME
# define CLOCK_REALTIME 0
# define CLOCK_REALTIME 0
# endif
# ifndef CLOCK_MONOTONIC
# define CLOCK_MONOTONIC 1
# define CLOCK_MONOTONIC 1
# endif

struct itimerspec
Expand Down

0 comments on commit dae4f6f

Please sign in to comment.