For your consideration, this allows building the libretro target on the Haiku operating system. Haiku is mostly POSIX but doesn't have a full port of GTK hence standalone bsnes is a no-go, but the libretro target builds and works flawlessly.
Sorry for the long wait for approval! The changes you made look good, so I squashed them into a single commit and merged it: 6fc6bf14a39d32dab69c4f9687a81df26d412758
For your consideration, this allows building the libretro target on the Haiku operating system. Haiku is mostly POSIX but doesn't have a full port of GTK hence standalone bsnes is a no-go, but the libretro target builds and works flawlessly.