You managed to cut too much from the manpage: POSIX systems on which sched_get_priority_max and sched_get_priority_min are available define _POSIX_PRIORITY_SCHEDULING in <unistd.h>.
So it's real easy to test if they're available, and to cook up a patch to send upstream to get people to start writing *portable* software.