diff options
author | Nick Clifton <nickc@redhat.com> | 2022-03-18 15:45:34 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2022-03-18 15:46:33 +0000 |
commit | 0a30596cfad9cd221a81eea984b6fe3fabb20b95 (patch) | |
tree | b688d33f46d2507a16dc89d7f057cba01618c355 /gprofng/testsuite | |
parent | f0cf07f341f565978228c9a2cfa73d2a9f3001c3 (diff) | |
download | binutils-0a30596cfad9cd221a81eea984b6fe3fabb20b95.zip binutils-0a30596cfad9cd221a81eea984b6fe3fabb20b95.tar.gz binutils-0a30596cfad9cd221a81eea984b6fe3fabb20b95.tar.bz2 |
Fix Build issues due to patch "gprofng: a new GNU profiler"
Find and fix more places where clock_gettime() and CLOCK_MONOTONIC_RAW are used.
Diffstat (limited to 'gprofng/testsuite')
-rw-r--r-- | gprofng/testsuite/gprofng.display/mttest/gethrtime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gprofng/testsuite/gprofng.display/mttest/gethrtime.c b/gprofng/testsuite/gprofng.display/mttest/gethrtime.c index a985401..aa5a4b9 100644 --- a/gprofng/testsuite/gprofng.display/mttest/gethrtime.c +++ b/gprofng/testsuite/gprofng.display/mttest/gethrtime.c @@ -222,7 +222,12 @@ gethrtime (void) { struct timespec tp; hrtime_t rc = 0; +#ifdef CLOCK_MONOTONIC_RAW + int r = clock_gettime (CLOCK_MONOTONIC_RAW, &tp); +#else int r = clock_gettime (CLOCK_MONOTONIC, &tp); +#endif + if (r == 0) rc = ((hrtime_t) tp.tv_sec) * 1000000000 + (hrtime_t) tp.tv_nsec; return rc; |