mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-08 16:30:27 +01:00
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 have. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8592>
This commit is contained in:
parent
f2545f22f4
commit
abdaf5fab8
1 changed files with 4 additions and 3 deletions
|
|
@ -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 += [
|
||||
'_POSIX_SOURCE',
|
||||
|
|
@ -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']
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue