fix blocksruntime wasm build
This commit is contained in:
parent
280688b615
commit
22ee3e232c
1 changed files with 26 additions and 14 deletions
20
thirdparty/blocksruntime/BlocksRuntime/runtime.c
vendored
20
thirdparty/blocksruntime/BlocksRuntime/runtime.c
vendored
|
|
@ -23,10 +23,23 @@
|
|||
*/
|
||||
|
||||
#include "Block_private.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef PLATFORM_WASM
|
||||
void* malloc(unsigned long s);
|
||||
void free(void* ptr);
|
||||
int printf_(const char*, ...);
|
||||
#define printf printf_
|
||||
int sprintf(char* restrict, const char* restrict, ...);
|
||||
#define memmove(a, b, c) __builtin_memmove(a, b, c)
|
||||
#define exit(a) do { if (a != 0) { __builtin_trap(); } } while (0)
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
|
@ -697,4 +710,3 @@ const char *_Block_byref_dump(struct Block_byref *src) {
|
|||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue