Using the correct board definition and the latest Arduino IDE, I get “Error compiling for board”. Is there another simple change that will allow it to compile or am I out of luck using the WiFi shield with the SAMD board?
I solved the problem. I apologize for posting before doing more debug. The change noted in my post is not correct and needed to be moved to a library class. Software serial will not work anyway because it turns out that on the board I’m using pins 8 and 9 are not available for serial to the ESP8266, so I switched to hardware serial.
I am porting code from the ATmega 328 to the ATSAMD21G because I needed more SRAM for a server application. Everything now works. It did require some changes to the ESP8266 library and to the original Arduino 328 code to accommodate timing and board library differences to get it to work.