From 003fdafbea1a788195114c28bf6a56e195e3a954 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Fri, 28 Dec 2018 01:34:08 +0000 Subject: [PATCH] libm: Include float.h to get LDBL_MANT_DIG The long double aliases of double functions are only exposed as aliases if LDBL_MANT_DIG is 53 (same as DBL_MANT_DIG). Without float.h included these files were not exposing weak aliases as expected, leading to link failures if programs use the *l functions. This should fix editors/calligra on targets with 64-bit long double, which uses erfl and erfcl. Found on powerpc64. Reviewed by: kargl@ --- lib/msun/src/s_cbrt.c | 1 + lib/msun/src/s_cproj.c | 1 + lib/msun/src/s_erf.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/msun/src/s_cbrt.c b/lib/msun/src/s_cbrt.c index 30ffe5f294a2..0e609e110d9a 100644 --- a/lib/msun/src/s_cbrt.c +++ b/lib/msun/src/s_cbrt.c @@ -15,6 +15,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/s_cproj.c b/lib/msun/src/s_cproj.c index 220b4c83fe31..38e774723e86 100644 --- a/lib/msun/src/s_cproj.c +++ b/lib/msun/src/s_cproj.c @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include "math_private.h" diff --git a/lib/msun/src/s_erf.c b/lib/msun/src/s_erf.c index e1d63bca8197..5f228474f422 100644 --- a/lib/msun/src/s_erf.c +++ b/lib/msun/src/s_erf.c @@ -107,7 +107,7 @@ __FBSDID("$FreeBSD$"); * erfc/erf(NaN) is NaN */ - +#include #include "math.h" #include "math_private.h"