From: José Fonseca Date: Tue, 8 Oct 2013 00:09:46 +0000 (-0700) Subject: util/u_math: Fix C++ include of u_math.h on MSVC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbc1f3677c1deb32358a6a53f0ad3638a78c7c4f;p=mesa.git util/u_math: Fix C++ include of u_math.h on MSVC. GNU C++ compiler declares the C99 lrint, etc. when _GNU_SOURCE is defined, but MSVC does not. Trivial. --- diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 478a4aa4d17..30053492d8a 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -162,7 +162,7 @@ float log2f(float f) #endif -#if __STDC_VERSION__ < 199901L && !defined(__cplusplus) +#if __STDC_VERSION__ < 199901L && (!defined(__cplusplus) || !defined(_GNU_SOURCE)) static INLINE long int lrint(double d) {