From: Vinson Lee Date: Thu, 12 Aug 2010 21:54:30 +0000 (-0700) Subject: mesa: Fix FreeBSD build with llvm enabled. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56450d5f11c2f46cbb9cdba85a3e3d7561be4d51;p=mesa.git mesa: Fix FreeBSD build with llvm enabled. On FreeBSD LC_CTYPE_MASK is not available but 'llvm-config --cppflags' adds the compiler flag -D_GNU_SOURCE to the build. --- diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index c3993510967..46e5c932d0f 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -756,7 +756,7 @@ _mesa_strdup( const char *s ) float _mesa_strtof( const char *s, char **end ) { -#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) +#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) static locale_t loc = NULL; if (!loc) { loc = newlocale(LC_CTYPE_MASK, "C", NULL);