mesa: Fix FreeBSD build with llvm enabled.
authorVinson Lee <vlee@vmware.com>
Thu, 12 Aug 2010 21:54:30 +0000 (14:54 -0700)
committerVinson Lee <vlee@vmware.com>
Thu, 12 Aug 2010 21:54:30 +0000 (14:54 -0700)
On FreeBSD LC_CTYPE_MASK is not available but 'llvm-config --cppflags'
adds the compiler flag -D_GNU_SOURCE to the build.

src/mesa/main/imports.c

index c399351..46e5c93 100644 (file)
@@ -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);