meson: Fix build with musl libc
This corrects a variety of compile-time errors and warnings when building the standard set of backends with meson on a system with the musl libc. In fixing this, it is hoped that a greater variety of platforms also benefit from decreased specificity to glibc-provided features.
Thanks for looking at this and for any reply.