Skip to content

Commit 8436e88

Browse files
Fix link error for ESP-IDF 4.4.2 (#1520)
Fix the issue reported by #1484: Platform ESP-IDF broken for WAMR 1.0.0 with ESP-IDF 4.4.2 Let the dummy ftruncate only work with ESP-IDF earlier than 4.4.2
1 parent 3d56c81 commit 8436e88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,14 @@ fdopendir(int fd)
228228
return NULL;
229229
}
230230

231+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 4, 2)
231232
int
232233
ftruncate(int fd, off_t length)
233234
{
234235
errno = ENOSYS;
235236
return -1;
236237
}
238+
#endif
237239

238240
int
239241
futimens(int fd, const struct timespec times[2])

0 commit comments

Comments
 (0)