Prevent that the clock_gettime() and CLOCK_MONOTONIC tests fail as follows:
error: argument 2 null where non-null expected [-Werror=nonnull]
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
#include <time.h>
int main(int argc, char **argv)
{
- return clock_gettime(0, NULL);
+ struct timespec ts;
+
+ return clock_gettime(0, &ts);
}
EOF
if compile_prog "" "" "clock_gettime"; then
#include <time.h>
int main(int argc, char **argv)
{
- return clock_gettime(CLOCK_MONOTONIC, NULL);
+ struct timespec ts;
+
+ return clock_gettime(CLOCK_MONOTONIC, &ts);
}
EOF
if compile_prog "" "$LIBS" "clock monotonic"; then