util: Fixes -Wundef in u_qsort.h

Partial of: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7680

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
This commit is contained in:
Yonggang Luo
2022-11-22 18:23:01 +08:00
committed by Marge Bot
parent d1d2e0efcd
commit 485505d550
+2 -2
View File
@@ -56,10 +56,10 @@ util_qsort_r(void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *, void *),
void *arg)
{
#if HAVE_GNU_QSORT_R
#if defined(HAVE_GNU_QSORT_R)
/* GNU extension added in glibc 2.8 */
qsort_r(base, nmemb, size, compar, arg);
#elif HAVE_BSD_QSORT_R
#elif defined(HAVE_BSD_QSORT_R)
/* BSD/macOS qsort_r takes "arg" before the comparison function and it
* pass the "arg" before the elements.
*/