nice to see some problems are fixed, unfortunately some older systems do no support “clock_gettime”. Yo are right, CLOCK_MONOTONIC_RAW became available with MacOS 10.12, but older releases do not support “clock_gettime”, therefore CLOCK_MONOTONIC can not used also.
#995, “Start delay period may be incorrect if system clock changes significantly during start up” for more information.
I add a fix to build monit 5.29.0 on older systems again.
Sorry, with regards,
Build failed on older MacOS system without clock_gettime.
I fixed the problem by an additional #ifdef in libmonit/src/system/Time.c to get the old behaviour back again.
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/exceptions -I./src/io -I./src/net -I./src/util -I./src/thread -Wno-address -Wno-pointer-sign -g -O2 -Wextra -fstack-protector-all -DREENTRANT -D_GNU_SOURCE -Wall -Wunused -Wno-unused-label -funsigned-char -std=c99 -c src/system/Time.c -fno-common -DPIC -o src/system/.libs/Time.o src/system/Time.c:1286:6: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration] if (clock_gettime(CLOCK_MONOTONIC, &t) != 0) ^ src/system/Time.c:1286:20: error: use of undeclared identifier 'CLOCK_MONOTONIC' if (clock_gettime(CLOCK_MONOTONIC, &t) != 0) ^ 1 warning and 1 error generated. make: *** [src/system/Time.lo] Error 1 make: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1 make: *** [all] Error 2
I will append a fix soon.