File 0789-erts-Fix-clock_getres-configure-test-to-work.patch of Package erlang

From 9f71889dc4a191d8741449f5e6e540fd2d7aeb4f Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Mon, 14 Oct 2019 17:13:13 +0200
Subject: [PATCH] erts: Fix clock_getres configure test to work

We cannot use varibles in AC_CHECK_FUNC as autoheader will not
work then.
---
 erts/aclocal.m4 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/erts/aclocal.m4 b/erts/aclocal.m4
index 3d227e462c..c7929d6193 100644
--- a/erts/aclocal.m4
+++ b/erts/aclocal.m4
@@ -788,12 +788,11 @@ $trust_test
   LIBS="$save_LIBS"
 
   if test "$LD_MAY_BE_WEAK" != "no"; then
-     check_for_clock_getres=
+    AC_CHECK_FUNCS([clock_get_attributes gethrtime])
   else
-     check_for_clock_getres=clock_getres
+    AC_CHECK_FUNCS([clock_getres clock_get_attributes gethrtime])
   fi
 
-  AC_CHECK_FUNCS([$check_for_clock_getres clock_get_attributes gethrtime])
   
   AC_CACHE_CHECK([for mach clock_get_time() with monotonic clock type], erl_cv_mach_clock_get_time_monotonic,
   [
-- 
2.16.4

openSUSE Build Service is sponsored by