make lrint and llrint functions work without fenv support
[musl] / src / math / lrintl.c
index 0e579bc..5eb1ba7 100644 (file)
@@ -8,7 +8,7 @@ long lrintl(long double x)
 {
        return lrint(x);
 }
-#else
+#elif defined(FE_INEXACT)
 /*
 see comments in lrint.c
 
@@ -27,4 +27,9 @@ long lrintl(long double x)
        /* conversion */
        return x;
 }
+#else
+long lrintl(long double x)
+{
+       return rintl(x);
+}
 #endif