When using CPP and C combination this particular file threw error on linking. Merges https://github.com/espressif/esp-idf/pull/1249 (Amended to add INC_FREERTOS_H guard, comment on #endif)