summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorEWouters <6179932+EWouters@users.noreply.github.com>2022-05-07 22:41:59 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-07 23:36:49 +0200
commit6ea89c35febf6e3480f1306d34cf4fd70a99a878 (patch)
treef3dbc930a129ad47af66d8584592577235abe345 /AK
parentfbc1448eab7a1ea681a57bebed6a6f0b3aa8a281 (diff)
downloadserenity-6ea89c35febf6e3480f1306d34cf4fd70a99a878.zip
AK: Use builtin versions of `llrint{,l,f}`
This fixes the build on M1 Macs.
Diffstat (limited to 'AK')
-rw-r--r--AK/Math.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/AK/Math.h b/AK/Math.h
index d7026bb1e5..2af14367dc 100644
--- a/AK/Math.h
+++ b/AK/Math.h
@@ -577,11 +577,11 @@ ALWAYS_INLINE I round_to(P value)
return static_cast<I>(ret);
#else
if constexpr (IsSame<P, long double>)
- return static_cast<I>(llrintl(value));
+ return static_cast<I>(__builtin_llrintl(value));
if constexpr (IsSame<P, double>)
- return static_cast<I>(llrint(value));
+ return static_cast<I>(__builtin_llrint(value));
if constexpr (IsSame<P, float>)
- return static_cast<I>(llrintf(value));
+ return static_cast<I>(__builtin_llrintf(value));
#endif
}