SPI.cpp Isuue with declaration and suggested alternative

I get an error when compiling and it kicks out. Here is a snippet from verbose:

IC:\\Users\\me\\Documents\\Arduino\\libraries\\SPI" "C:\\Users\\me\\Documents\\Arduino\\libraries\\SPI\\SPI.cpp" -o "C:\\Users\\me\\AppData\\Local\\Temp\\arduino_build_588846\\libraries\\SPI\\SPI.cpp.o"
C:\Users\me\Documents\Arduino\libraries\SPI\SPI.cpp: In member function 'void SPIClass::begin()':

C:\Users\me\Documents\Arduino\libraries\SPI\SPI.cpp:68:9: error: 'IOSWAP' was not declared in this scope

         IOSWAP |= (1 << IOSWAP2CS);

these similar error go on for pages.

Any help would be greatly appreciated.

What is your target Arduino board? Not all boards have SPI...

Of the boards I have installed, IOSWAP is only defined for ESP8266.

AFAIK, there shouldn't be an SPI library in your ~/Documents/Arduino/libraries folder. Each hardware core that supports SPI comes with its own version.

Pieter