Mesa (master): Fix compile time errors when building against uclibc
Matt Turner
mattst88 at kemper.freedesktop.org
Tue Jul 24 20:00:45 UTC 2012
Module: Mesa
Branch: master
Commit: f35e380dd240b418e17a179af73bbab74ceea784
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f35e380dd240b418e17a179af73bbab74ceea784
Author: Anthony G. Basile <blueness at gentoo.org>
Date: Tue Jul 24 12:59:54 2012 -0700
Fix compile time errors when building against uclibc
Mesa misses a few checks when compiling on a uclibc system
which cause it to fall back on glibc-ism. This patch
addresses those issues.
Acked-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Anthony G. Basile <blueness at gentoo.org>
---
src/gallium/auxiliary/util/u_debug_symbol.c | 2 ++
src/glsl/strtod.c | 2 +-
src/mesa/main/imports.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
index bae9be8..3d2f8eb 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -152,7 +152,9 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
#endif
#ifdef __GLIBC__
+#ifndef __UCLIBC__
#include <execinfo.h>
+#endif
/* This can only provide dynamic symbols, or binary offsets into a file.
*
diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c
index a876e13..47c1f0e 100644
--- a/src/glsl/strtod.c
+++ b/src/glsl/strtod.c
@@ -45,7 +45,7 @@ double
glsl_strtod(const char *s, char **end)
{
#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
- !defined(__HAIKU__)
+ !defined(__HAIKU__) && !defined(__UCLIBC__)
static locale_t loc = NULL;
if (!loc) {
loc = newlocale(LC_CTYPE_MASK, "C", NULL);
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 444de87..0d6b56a 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -542,7 +542,7 @@ float
_mesa_strtof( const char *s, char **end )
{
#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
- !defined(ANDROID) && !defined(__HAIKU__)
+ !defined(ANDROID) && !defined(__HAIKU__) && !defined(__UCLIBC__)
static locale_t loc = NULL;
if (!loc) {
loc = newlocale(LC_CTYPE_MASK, "C", NULL);
More information about the mesa-commit
mailing list