#MAME 0.285 compiles on #HaikuOS after adding a small upstream patch (a missing #include).
If you're struggling to compile the latest version of MAME (I bet #FreeBSD and #NetBSD probably have the same issue), give this a go: https://github.com/mamedev/mame/commit/ffde4d3920ae99d2730db83982ffa9f8fbd8abd2
Anyway, there's a PR on HaikuPorts for the update, so it should be with you lovely people in the next few days.