From: degomme Date: Tue, 3 Apr 2018 21:23:55 +0000 (+0200) Subject: fix tests with timers by properly detecting POSIX_TIMERS X-Git-Tag: v3.20~527 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b6fab13ac17d733240906e31d913a444a5eb27cd?ds=sidebyside fix tests with timers by properly detecting POSIX_TIMERS --- 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);