Solaris fixes
Fixes needed to make git master build on Solaris development trunk on x86-64 platform.
This is a combination of some existing fixes we've been carrying for years but not yet upstreamed along with updates for meson support and the recent addition of pthread_setname_np() usage in Mesa.
With these patches I was able to build this branch using:
env PKG_CONFIG_PATH=/usr/lib/64/pkgconfig \
CFLAGS=-Wno-error=incompatible-pointer-types meson \
-Ddri-drivers=swrast -Dgallium-drivers= -Dvulkan-drivers= \
-Dplatforms=x11,drm,surfaceless
(I had to disable the default drivers because our libdrm_intel is only 2.4.97, while 2.4.99 is now required, and because we don't have any other drm/kms drivers in our kernel besides i915. The Intel Vulkan driver had to be disabled because it requires Linux-only functions such as futexes. For platforms, I had to drop wayland, which doesn't support Solaris.)