Skip to content

Commit

Permalink
configure.ac: don't check for clock_ functions
Browse files Browse the repository at this point in the history
They shouldn't be exposed on Windows and lead to winpthread being linked in
  • Loading branch information
lazka committed Jul 19, 2023
1 parent 0f91d7c commit fdd0d90
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5205,6 +5205,9 @@ WITH_SAVE_ENV([
])
])

case $host in
*-*-mingw*) ;;
*)
AC_CHECK_FUNCS(clock_gettime, [], [
AC_CHECK_LIB(rt, clock_gettime, [
LIBS="$LIBS -lrt"
Expand All @@ -5225,6 +5228,8 @@ AC_CHECK_FUNCS(clock_settime, [], [
AC_DEFINE(HAVE_CLOCK_SETTIME, 1)
])
])
;;
esac

AC_CHECK_FUNCS(clock_nanosleep, [], [
AC_CHECK_LIB(rt, clock_nanosleep, [
Expand Down

0 comments on commit fdd0d90

Please sign in to comment.