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:
+2
-2
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user