Add missing functions to make RIOT work with the 2.x.x version (#3508)

The `os_mremap` and `os_getpagesize` were missing in the `core/shared/platform/riot`
and were preventing RIOT from compiling if using WAMR v2.x.x. This PR is adding
both functions and should allow RIOT to update WAMR version to v2.x.x.

Signed-off-by:: mewen.berthelot <mewen.berthelot@orange.com>
This commit is contained in:
Berthelot Mewen 2024-06-07 03:40:35 +02:00 committed by GitHub
parent 8f86b37616
commit dc21c62431
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -94,4 +94,12 @@ os_get_invalid_handle()
return -1;
}
/* There is no MMU in RIOT so the function return 1024 to make the compiler
happy */
static inline int
os_getpagesize()
{
return 1024;
}
#endif /* end of _BH_PLATFORM_H */

View File

@ -57,6 +57,12 @@ os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
return BH_MALLOC((unsigned)size);
}
void *
os_mremap(void *old_addr, size_t old_size, size_t new_size)
{
return os_mremap_slow(old_addr, old_size, new_size);
}
void
os_munmap(void *addr, size_t size)
{