From 184e0daed398014c44668dfa4b91eaafecd1198a Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 1 Aug 2021 18:35:17 +0200 Subject: [PATCH] configure.ac: don't check for clock_ functions They shouldn't be exposed on Windows and lead to winpthread being linked in --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index fbd0383e46e2c2..7cf11c57abf057 100644 --- a/configure.ac +++ b/configure.ac @@ -5209,6 +5209,9 @@ WITH_SAVE_ENV([ ]) ]) +case $host in + *-*-mingw*) ;; + *) AC_CHECK_FUNCS(clock_gettime, [], [ AC_CHECK_LIB(rt, clock_gettime, [ LIBS="$LIBS -lrt" @@ -5229,6 +5232,8 @@ AC_CHECK_FUNCS(clock_settime, [], [ AC_DEFINE(HAVE_CLOCK_SETTIME, 1) ]) ]) + ;; +esac AC_CHECK_FUNCS(clock_nanosleep, [], [ AC_CHECK_LIB(rt, clock_nanosleep, [