From c6ea83971f69a308e49e9e25e34dabbe6a9877de Mon Sep 17 00:00:00 2001 From: AJIN J <58898884+AjinJayan@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:07:54 +0530 Subject: [PATCH] Added missing header files error: implicit declaration of function 'vTaskDelete' [-Werror=implicit-function-declaration] error: implicit declaration of function 'usleep'; did you mean 'fseek'? [-Werror=implicit-function-declaration] usleep(100000); To resolve these errors header files were added #ifdef ESP_PLATFORM #include "freertos/FreeRTOS.h" #include "freertos/task.h" #endif #include --- apps/int32_subscriber/app.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/int32_subscriber/app.c b/apps/int32_subscriber/app.c index 4f755fd3..9e58cd05 100644 --- a/apps/int32_subscriber/app.c +++ b/apps/int32_subscriber/app.c @@ -2,11 +2,17 @@ #include #include #include +#include #include #include +#ifdef ESP_PLATFORM +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#endif + #define RCCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Aborting.\n",__LINE__,(int)temp_rc);vTaskDelete(NULL);}} #define RCSOFTCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Continuing.\n",__LINE__,(int)temp_rc);}}