Commit abdaf5fa authored by Dylan Baker's avatar Dylan Baker Committed by Marge Bot
Browse files

Scons: check for timespec_get on windows as well as unices

windows has a timespec_get function, and if we don't check that then it
will try to fall back to using clock_gettime, which windows doesn't

Reviewed-by: Jose Fonseca's avatarJose Fonseca <>
Part-of: <!8592>
parent f2545f22
Pipeline #264667 waiting for manual action with stages
......@@ -340,6 +340,10 @@ def generate(env):
cppdefines += ['NDEBUG']
if env['build'] == 'profile':
cppdefines += ['PROFILE']
if check_functions(env, ['timespec_get']):
cppdefines += ['HAVE_TIMESPEC_GET']
if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
cppdefines += [
......@@ -374,9 +378,6 @@ def generate(env):
if check_functions(env, ['random_r']):
cppdefines += ['HAVE_RANDOM_R']
if check_functions(env, ['timespec_get']):
cppdefines += ['HAVE_TIMESPEC_GET']
if check_header(env, 'sys/shm.h'):
cppdefines += ['HAVE_SYS_SHM_H']
Supports Markdown
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