fix blocksruntime wasm build

This commit is contained in:
Judah Caruso 2026-02-19 23:38:59 -07:00
parent 280688b615
commit 22ee3e232c

View file

@ -23,10 +23,23 @@
*/ */
#include "Block_private.h" #include "Block_private.h"
#include <stdio.h>
#include <stdlib.h> #ifdef PLATFORM_WASM
#include <string.h> 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 <stdint.h>
#include <stddef.h>
#include "config.h" #include "config.h"
@ -697,4 +710,3 @@ const char *_Block_byref_dump(struct Block_byref *src) {
} }
return buffer; return buffer;
} }