Commit c5d0dc7f authored by Vinson Lee's avatar Vinson Lee

scons: Check for xlocale.h before defining HAVE_XLOCALE_H.

Don't assume the header is present on some platforms - use the more
robust CheckHeader() instead.

glibc 2.26 removed xlocale.h.

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: Vinson Lee's avatarVinson Lee <>
Reviewed-by: default avatarEmil Velikov <>
Reviewed-by: Eric Engestrom's avatarEric Engestrom <>
Tested-by: Eric Engestrom's avatarEric Engestrom <>
parent a6c2001a
......@@ -325,8 +325,10 @@ def generate(env):
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 += [
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment