aboutsummaryrefslogtreecommitdiff
path: root/mesalib/include/c99_math.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/include/c99_math.h')
-rw-r--r--mesalib/include/c99_math.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesalib/include/c99_math.h b/mesalib/include/c99_math.h
index 5b01d53a8..7ed7cc221 100644
--- a/mesalib/include/c99_math.h
+++ b/mesalib/include/c99_math.h
@@ -82,7 +82,12 @@ roundf(float x)
#endif /* _MSC_VER */
-#if __STDC_VERSION__ < 199901L && (!defined(__cplusplus) || defined(_MSC_VER))
+#if (defined(_MSC_VER) && _MSC_VER < 1800) || \
+ (!defined(_MSC_VER) && \
+ __STDC_VERSION__ < 199901L && \
+ (!defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 600) && \
+ !defined(__cplusplus))
+
static inline long int
lrint(double d)
{
@@ -134,6 +139,7 @@ llrintf(float f)
return rounded;
}
+
#endif /* C99 */