meson: Require clock_gettime() as well for MONOTONIC_CLOCK

As configure.ac, require that clock_gettime() exists as well to use
MONOTONIC_CLOCK (MinGW provides the define, but not the function)
This commit is contained in:
Jon Turney 2019-04-26 01:00:28 +01:00 committed by Adam Jackson
parent 92a52611f6
commit 50b8670fdf

View File

@ -20,7 +20,8 @@ conf_data.set('HAVE_TYPEOF', cc.compiles('''
''',
name: 'typeof()'))
conf_data.set('MONOTONIC_CLOCK', cc.compiles('''
conf_data.set('MONOTONIC_CLOCK', cc.has_function('clock_gettime') and
cc.compiles('''
#define _POSIX_C_SOURCE 200112L
#include <time.h>
#include <unistd.h>