Skip to content

Commit fa920a6

Browse files
sagebindalexcrichton
authored andcommitted
Fix Curl_now() timer resolution (#305)
* Fix Curl_now() timer resolution Configure libcurl to use more accurate means of time measurement for use with various calculations, such as CURLINFO_TOTAL_TIME. * Formatting
1 parent f807ab0 commit fa920a6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

curl-sys/build.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ fn main() {
258258
}
259259

260260
if windows {
261-
cfg.define("USE_THREADS_WIN32", None)
261+
cfg.define("WIN32", None)
262+
.define("USE_THREADS_WIN32", None)
262263
.define("HAVE_IOCTLSOCKET_FIONBIO", None)
263264
.define("USE_WINSOCK", None)
264265
.file("curl/lib/system_win32.c");
@@ -267,7 +268,13 @@ fn main() {
267268
cfg.file("curl/lib/vauth/spnego_sspi.c");
268269
}
269270
} else {
271+
if target.contains("-apple-") {
272+
cfg.define("__APPLE__", None).define("macintosh", None);
273+
}
274+
270275
cfg.define("RECV_TYPE_ARG1", "int")
276+
.define("HAVE_CLOCK_GETTIME_MONOTONIC", None)
277+
.define("HAVE_GETTIMEOFDAY", None)
271278
.define("HAVE_PTHREAD_H", None)
272279
.define("HAVE_ARPA_INET_H", None)
273280
.define("HAVE_ERRNO_H", None)

0 commit comments

Comments
 (0)