HomeFreeBSD

stdlib.h: Fix qsort_r compatibility with GCC 12.

Description

stdlib.h: Fix qsort_r compatibility with GCC 12.

GCC 12 (unlike GCC 9) does not match a function argument passed to the
old qsort_r() API (as is used in the qsort_r_compat test) to a
function pointer type via __generic. It treats the function type as a
distinct type from a function pointer. As a workaround, add a second
definition of qsort_r for GCC 12 which uses the bare function type.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D37410