diff --git a/.pick_status.json b/.pick_status.json index 498b563c423..b17ff958b2e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -805,7 +805,7 @@ "description": "Fall back on clock_gettime when timespec_get() is unavailable", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "e3a8013de8ca854d21225be00f123ccf63f9060f" }, diff --git a/src/util/u_queue.c b/src/util/u_queue.c index b11b297a45c..cf550424d8e 100644 --- a/src/util/u_queue.c +++ b/src/util/u_queue.c @@ -183,7 +183,11 @@ _util_queue_fence_wait_timeout(struct util_queue_fence *fence, if (rel > 0) { struct timespec ts; +#ifdef HAVE_TIMESPEC_GET timespec_get(&ts, TIME_UTC); +#else + clock_gettime(CLOCK_REALTIME, &ts); +#endif ts.tv_sec += abs_timeout / (1000*1000*1000); ts.tv_nsec += abs_timeout % (1000*1000*1000);