about summary refs log tree commit diff
path: root/src/math/lrint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/lrint.c')
-rw-r--r--src/math/lrint.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/math/lrint.c b/src/math/lrint.c
index 98d58ad0..9754fa74 100644
--- a/src/math/lrint.c
+++ b/src/math/lrint.c
@@ -49,8 +49,10 @@ dtype fn(type x)
 
 	feholdexcept(&env);
 	d = (dtype)roundit(x);
+#if defined(FE_INVALID) && defined(FE_INEXACT)
 	if (fetestexcept(FE_INVALID))
 		feclearexcept(FE_INEXACT);
+#endif
 	feupdateenv(&env);
 	return d;
 }