Fix the clock_gettime() test on macOS Sierra.

macOS now supports clock_gettime() but it is part of libSystem
rather than librt which does not exist on macOS.
This commit is contained in:
Peter Powell 2016-12-26 05:17:41 +00:00
parent 62aa553563
commit 27facf2e0c

2
configure vendored
View File

@ -149,7 +149,7 @@ unless ($config{CXX}) {
}
my %compiler = get_compiler_info($config{CXX});
$config{HAS_CLOCK_GETTIME} = run_test 'clock_gettime()', test_file($config{CXX}, 'clock_gettime.cpp', '-lrt');
$config{HAS_CLOCK_GETTIME} = run_test 'clock_gettime()', test_file($config{CXX}, 'clock_gettime.cpp', $^O eq 'darwin' ? undef : '-lrt');
$config{HAS_EVENTFD} = run_test 'eventfd()', test_file($config{CXX}, 'eventfd.cpp');
if ($config{HAS_EPOLL} = run_test 'epoll', test_header($config{CXX}, 'sys/epoll.h')) {