From a9a78640d974820edd0c4a4325e04664471c4e06 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 11 Oct 2013 16:57:02 -0700 Subject: [PATCH] mesa: Do not use newlocale on NetBSD. Fixes this build error. CC imports.lo ../../src/mesa/main/imports.c: In function '_mesa_strtof': ../../src/mesa/main/imports.c:570:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'loc' ../../src/mesa/main/imports.c:570:20: error: 'loc' undeclared (first use in this function) ../../src/mesa/main/imports.c:570:20: note: each undeclared identifier is reported only once for each function it appears in ../../src/mesa/main/imports.c:572:7: error: implicit declaration of function 'newlocale' ../../src/mesa/main/imports.c:572:23: error: 'LC_CTYPE_MASK' undeclared (first use in this function) ../../src/mesa/main/imports.c:574:4: error: implicit declaration of function 'strtof_l' ../../src/mesa/main/imports.c:580:1: warning: control reaches end of non-void function Signed-off-by: Vinson Lee --- src/mesa/main/imports.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index ca6b1d53eee..277e9476a66 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -566,7 +566,8 @@ float _mesa_strtof( const char *s, char **end ) { #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \ - !defined(ANDROID) && !defined(__HAIKU__) && !defined(__UCLIBC__) + !defined(ANDROID) && !defined(__HAIKU__) && !defined(__UCLIBC__) && \ + !defined(__NetBSD__) static locale_t loc = NULL; if (!loc) { loc = newlocale(LC_CTYPE_MASK, "C", NULL); -- 2.30.2