From b6fab13ac17d733240906e31d913a444a5eb27cd Mon Sep 17 00:00:00 2001 From: degomme Date: Tue, 3 Apr 2018 23:23:55 +0200 Subject: [PATCH] fix tests with timers by properly detecting POSIX_TIMERS --- include/smpi/smpi_helpers.h | 1 + teshsuite/smpi/timers/timers.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/smpi/smpi_helpers.h b/include/smpi/smpi_helpers.h index 9f6f0b5333..d6e828e9b2 100644 --- a/include/smpi/smpi_helpers.h +++ b/include/smpi/smpi_helpers.h @@ -1,6 +1,7 @@ #ifndef MPI_HELPERS_H #define MPI_HELPERS_H +#include #include /* Load it before the define next line to not mess with the system headers */ #define sleep(x) smpi_sleep(x) diff --git a/teshsuite/smpi/timers/timers.c b/teshsuite/smpi/timers/timers.c index ad0cab56d8..a3479342d6 100644 --- a/teshsuite/smpi/timers/timers.c +++ b/teshsuite/smpi/timers/timers.c @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) clock_gettime(CLOCK_REALTIME, &tp1); clock_gettime(CLOCK_REALTIME, &tp2); if (tp1.tv_sec != tp2.tv_sec || tp1.tv_nsec != tp2.tv_nsec) - printf("Error, two consecutive calls to gettimeofday did not return same time (with running power to 0)\n"); + printf("Error, two consecutive calls to clock_gettime did not return same time (with running power to 0)\n"); // nanosleep for 100ns clock_gettime(CLOCK_REALTIME, &tp1); -- 2.20.1