Skip to content

Commit a15236d

Browse files
committed
Do not define HAVE_CLOCK_GETTIME_MONOTONIC on macOS
`clock_gettime` wasn't added until macOS 10.12, which causes `dyld: Symbol not found: _clock_gettime` error
1 parent 8936e34 commit a15236d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

curl-sys/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,11 @@ fn main() {
271271
} else {
272272
if target.contains("-apple-") {
273273
cfg.define("__APPLE__", None).define("macintosh", None);
274+
} else {
275+
cfg.define("HAVE_CLOCK_GETTIME_MONOTONIC", None);
274276
}
275277

276278
cfg.define("RECV_TYPE_ARG1", "int")
277-
.define("HAVE_CLOCK_GETTIME_MONOTONIC", None)
278279
.define("HAVE_GETTIMEOFDAY", None)
279280
.define("HAVE_PTHREAD_H", None)
280281
.define("HAVE_ARPA_INET_H", None)

0 commit comments

Comments
 (0)