Fix clock_gettime presence detect on FreeBSD.
For non-Linux, _POSIX_C_SOURCE and friends restrict symbols defined rather than enabling defines of symbols. Additionally, CLOCK_MONOTONIC was apparently added to the standard around 2000 anyway, not 1993.
This commit is contained in:
parent
ec17900f52
commit
d1de3dda8e
|
@ -722,7 +722,9 @@ if ! test "x$have_clock_gettime" = xno; then
|
||||||
LIBS="$CLOCK_LIBS"
|
LIBS="$CLOCK_LIBS"
|
||||||
|
|
||||||
AC_RUN_IFELSE([
|
AC_RUN_IFELSE([
|
||||||
|
#ifdef __linux__
|
||||||
#define _POSIX_C_SOURCE 199309L
|
#define _POSIX_C_SOURCE 199309L
|
||||||
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[[]]) {
|
int main(int argc, char *argv[[]]) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user