Ok, I worked it out.
References to wiring.h and string.h within the “extern C” function need to be removed/commented out, and #include “Arduino.h” needs to be added above that, outside the function, in EthernetCompat.cpp, EthernetDNS.cpp and EthernetDHCP.cpp.
Then I was able to get it verify/compile.