[PATCH v2 1/8] configure: Don't define HAVE_CLOCK_GETTIME on macOS.
Huw Davies
huw at codeweavers.com
Tue May 14 03:53:41 CDT 2019
Using clock_gettime() on macOS is problematical; see commit
27c71e09ad51ba6aa672a46379efd10b5959863f for an explanation.
Possible configure tests for this end up being quite ugly, so
avoiding it altogether seems simplest.
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
configure.ac | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index ae8e85b356..31176b8bc5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2262,11 +2262,15 @@ AC_CHECK_FUNCS(\
)
dnl Check for clock_gettime which may be in -lrt
-ac_save_LIBS=$LIBS
-AC_SEARCH_LIBS(clock_gettime, rt,
- [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have the `clock_gettime' function.])
+case $host_os in
+ darwin*|macosx*) ;;
+ *) ac_save_LIBS=$LIBS
+ AC_SEARCH_LIBS(clock_gettime, rt,
+ [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have the `clock_gettime' function.])
test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
-LIBS=$ac_save_LIBS
+ LIBS=$ac_save_LIBS
+ ;;
+esac
dnl **** Check for OpenLDAP ***
if test "x$with_ldap" != "xno"
--
2.17.1
More information about the wine-devel
mailing list