[Mesa-dev] [PATCH] scons: Check for xlocale.h before defining HAVE_XLOCALE_H.

Eric Engestrom eric.engestrom at imgtec.com
Thu Jul 6 15:38:33 UTC 2017


On Wednesday, 2017-07-05 21:25:12 +0000, Vinson Lee wrote:
> glibc 2.26 removed xlocale.h.
> https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
> 
> Fix this build error with glibc 2.26.
> 
>   Compiling src/util/strtod.c ...
> src/util/strtod.c:32:10: fatal error: xlocale.h: No such file or directory
>  #include <xlocale.h>
>           ^~~~~~~~~~~
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101657
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>

Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
Tested-by: Eric Engestrom <eric.engestrom at imgtec.com> # on Linux, both glibc 2.25 and 2.26

> ---
>  scons/gallium.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/scons/gallium.py b/scons/gallium.py
> index a41127732419..61643a6d4fc6 100755
> --- a/scons/gallium.py
> +++ b/scons/gallium.py
> @@ -325,8 +325,10 @@ def generate(env):
>                  'GLX_INDIRECT_RENDERING',
>              ]
>  
> -        if env['platform'] in ('linux', 'darwin'):
> +        conf = SCons.Script.Configure(env)
> +        if conf.CheckHeader('xlocale.h'):
>              cppdefines += ['HAVE_XLOCALE_H']
> +        env = conf.Finish()
>  
>      if platform == 'windows':
>          cppdefines += [
> -- 
> 2.13.2
> 


More information about the mesa-dev mailing list