Using esp_efuse_mac_get_default() in IDE 2.X to get ESP8266/ESP32 MAC address

Ok, I can't try it right now on ESP32.

Here is the ref for ESP8266 ( esp_efuse_mac_get_default()) . But still, I cannot use any of those functions:

esp_system.h: No such file or directory

esp_mac.h: No such file or directory