From: Pierre Moreau Date: Fri, 18 Mar 2016 00:17:31 +0000 (+0100) Subject: nv50/ra: `isinf()` is in namespace `std` since C++11. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f525db6358fbaa7b4296d2e6484e0b1ae703ac78;p=mesa.git nv50/ra: `isinf()` is in namespace `std` since C++11. This fixes a compile error while building Nouveau with C++11 enabled (and glibc >= 2.23). This happens if SWR is enabled, as it forces C++11. Signed-off-by: Pierre Moreau Signed-off-by: Jose Fonseca https://bugs.freedesktop.org/show_bug.cgi?id=94907 --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 500ab8915de..1b595aec364 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -1327,7 +1327,11 @@ GCRA::simplify() bestScore = score; } } +#if __cplusplus >= 201103L + if (std::isinf(bestScore)) { +#else if (isinf(bestScore)) { +#endif ERROR("no viable spill candidates left\n"); break; }