summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Taylor <taylorjonl@gmail.com>2016-01-04 07:12:24 +0000
committerJonathan Taylor <taylorjonl@gmail.com>2016-01-04 07:12:24 +0000
commitcf309e347b5a6893d751ffe359a856d4dc8db140 (patch)
treef999e066cd98e49ab47d35188a4c329686f2b88f
parent65923eb9308030bc1ef9d77dd347e7361545af83 (diff)
downloadcoreclr-cf309e347b5a6893d751ffe359a856d4dc8db140.tar.gz
coreclr-cf309e347b5a6893d751ffe359a856d4dc8db140.tar.bz2
coreclr-cf309e347b5a6893d751ffe359a856d4dc8db140.zip
Fix "call to 'sqrt' is ambiguous" error when building on SunOS
Building on SunOS will fail with the message of "call to 'sqrt' is ambiguous" because it can't determine the type of the constant value passed to it. This change adds a cast to a double because every usage uses this data type
-rw-r--r--src/pal/src/cruntime/finite.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pal/src/cruntime/finite.cpp b/src/pal/src/cruntime/finite.cpp
index 115a20becb..6e3dd3a3d4 100644
--- a/src/pal/src/cruntime/finite.cpp
+++ b/src/pal/src/cruntime/finite.cpp
@@ -28,9 +28,9 @@ Abstract:
#endif // HAVE_IEEEFP_H
#include <errno.h>
-#define PAL_NAN sqrt(-1)
-#define PAL_POSINF -log(0)
-#define PAL_NEGINF log(0)
+#define PAL_NAN sqrt(-1.0)
+#define PAL_POSINF -log(0.0)
+#define PAL_NEGINF log(0.0)
SET_DEFAULT_DEBUG_CHANNEL(CRT);