ESP32 IDF C++ adding private Libs

You can add

-I $PIOHOME_DIR/packages/framework-espidf/components/freertos/include/freertos

to your build_flags for that if you want.