The following patches fix compilation under FreeBSD. The gallium commit forgot about the other operating systems that are out there. These patches allow successful compilation.