Просмотр исходного кода

Enable platform support for esp-idf v5.0.1 (#2050)

dongheng 2 лет назад
Родитель
Сommit
d975a1a82c

+ 1 - 1
build-scripts/esp-idf/wamr/CMakeLists.txt

@@ -51,7 +51,7 @@ endif()
 
 idf_component_register(SRCS ${WAMR_RUNTIME_LIB_SOURCE} ${PLATFORM_SHARED_SOURCE}
   INCLUDE_DIRS ${IWASM_DIR}/include ${UTILS_SHARED_DIR} ${PLATFORM_SHARED_DIR} ${PLATFORM_SHARED_DIR}/../include
-  REQUIRES pthread
+  REQUIRES pthread lwip esp_timer
 )
 
 

+ 1 - 1
core/iwasm/aot/arch/aot_reloc_xtensa.c

@@ -294,7 +294,7 @@ apply_relocation(AOTModule *module, uint8 *target_section_addr,
                 snprintf(error_buf, error_buf_size,
                          "Load relocation section failed: "
                          "invalid relocation type %d.",
-                         reloc_type);
+                         (int)reloc_type);
             return false;
     }
 

+ 2 - 2
core/shared/platform/esp-idf/espidf_platform.c

@@ -215,7 +215,7 @@ unlinkat(int fd, const char *path, int flag)
 }
 
 int
-utimensat(int fd, const char *path, const struct timespec ts[2], int flag)
+utimensat(int fd, const char *path, const struct timespec *ts, int flag)
 {
     errno = ENOSYS;
     return -1;
@@ -238,7 +238,7 @@ ftruncate(int fd, off_t length)
 #endif
 
 int
-futimens(int fd, const struct timespec times[2])
+futimens(int fd, const struct timespec *times)
 {
     errno = ENOSYS;
     return -1;