I ported Spike's 2PSB/BSP2 support patch from FitzQuake Mark V (http://triptohell.info/moodles/junk/markv_bsp2.zip) to Quakespasm. It was a quick hack so I can play Tronyn's 2PSB maps under Quakespasm, not well tested, but since it seems to work I'll put the patch up here.
Updated patch that supports ijed's telefragged.bsp. I raised MAX_MAP_LEAFS to 65535; since it's used to size some static arrays, we need to use the same value when loading bsp2 or regular bsp.
Removed some of the limit exceeded warnings from bsp2 code paths.
Applied the second version of your patch with only minor whitespace adjustments at r881. Thanks!