lang/ruby{27,30,31,32}: Improve qsort_r() detection.
This change merges the following upstream pull request into the Ruby
interpreter:
https://github.com/ruby/ruby/pull/6332
Adding this patch is no-op right now because we are not using POSIX (GNU)
qsort_r(3) interface yet. It will fix build when the change is applied.
Reviewed by: bapt (portmgr@), sunpoet (ruby@)
PR: ports/266227
MFH: 2022Q3
Differential Revision: https://reviews.freebsd.org/D36492