From 65249c6f0a76bc671dbb216b4aed851ce99f00c9 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Wed, 21 Jun 2023 02:49:39 +0800 Subject: [PATCH] util: Fixes prototype of threads_timespec_compare using const struct timespec * is enough Fixes: 45bd24708a9 ("c11: Improve mtx_timedlock to use timespec_get instead of time(NULL)") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9230 Signed-off-by: Yonggang Luo Tested-by: Vinson Lee Reviewed-by: Jesse Natalie Part-of: --- src/c11/impl/threads_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c11/impl/threads_posix.c b/src/c11/impl/threads_posix.c index 614bc17cd21..2540e3e0c49 100644 --- a/src/c11/impl/threads_posix.c +++ b/src/c11/impl/threads_posix.c @@ -203,7 +203,7 @@ mtx_lock(mtx_t *mtx) } static int -threads_timespec_compare(struct timespec *a, struct timespec *b) +threads_timespec_compare(const struct timespec *a, const struct timespec *b) { if (a->tv_sec < b->tv_sec) { return -1;