SPI.h compile error, error: 'g_ioport_ctrl' was not declared in this scope

Could you please post the code that generates this error using code tags?
I have used SPI in both the MINIMA and WIFI without issue.