ESP WiFi.h gives error 'eth_config_t' does not name a type;

As @hallowed31 say, the error is

type or paste code here

that you should have deleted.