spi compilation fixes