MINGW-packages/mingw-w64-python/0061-configure.ac-don-t-check-for-clock_-functions.patch
2025-06-07 14:11:54 +02:00

34 lines
894 B
Diff

From 2ceeedcaf13090ec01313f2c2e221877bd043226 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sun, 1 Aug 2021 18:35:17 +0200
Subject: [PATCH 061/N] 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 d6e8604..e884431 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5540,6 +5540,9 @@ WITH_SAVE_ENV([
])
])
+case $host in
+ *-*-mingw*) ;;
+ *)
AC_CHECK_FUNCS([clock_gettime], [], [
AC_CHECK_LIB([rt], [clock_gettime], [
LIBS="$LIBS -lrt"
@@ -5560,6 +5563,8 @@ AC_CHECK_FUNCS([clock_settime], [], [
AC_DEFINE([HAVE_CLOCK_SETTIME], [1])
])
])
+ ;;
+esac
AC_CHECK_FUNCS([clock_nanosleep], [], [
AC_CHECK_LIB([rt], [clock_nanosleep], [