mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 06:55:07 +00:00
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:
parent
8f86b37616
commit
dc21c62431
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user